import
java.io.*;
import
java.math.*;
import
java.util.*;
public
class
GFG {
public
static
boolean
check(String a, String b)
{
int
l =
0
;
int
k =
0
;
int
countdiff =
0
;
while
(l < a.length()) {
if
(k < b.length()
&& a.charAt(l) == b.charAt(k)) {
l++;
k++;
}
else
{
l++;
countdiff++;
}
}
return
countdiff <=
1
;
}
public
static
void
main(String args[])
{
int
N =
5
;
String s =
"ababz"
;
if
(s.length() ==
1
) {
System.out.println(
"NO"
);
}
else
if
(s.length() %
2
==
0
) {
String fir = s.substring(
0
, (s.length() /
2
));
String sec = s.substring((s.length() /
2
));
if
(fir.equals(sec)) {
System.out.println(
"YES"
);
}
else
{
System.out.println(
"NO"
);
}
}
else
{
String fir = s.substring(
0
, s.length() /
2
+
1
);
String sec = s.substring(s.length() /
2
+
1
);
String third = s.substring(s.length() /
2
);
String fourth = s.substring(
0
, s.length() /
2
);
if
(check(fir, sec) || check(third, fourth)) {
System.out.println(
"YES"
);
}
else
{
System.out.println(
"NO"
);
}
}
}
}