import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);

String s =sc.next();
StringBuffer s1=new StringBuffer(s);
s1.reverse();
if(s.equals(s1.toString()))
{
int n=s.length();
int r=(n-1)/2;
String a=s.substring(0,r);
StringBuffer s2=new StringBuffer(a);
s2.reverse();
if(a.equals(s2.toString()))
{
int r1=(n+3)/2;
String b=s.substring(r1-1,n);
StringBuffer s3=new StringBuffer(b);
s3.reverse();
if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No");
}
else
System.out.println("No");
}
else
System.out.println("No");



}

} import java.util.*; util.* java public class Main
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);

String s =sc.next();
StringBuffer s1=new StringBuffer(s);
s1.reverse();
if(s.equals(s1.toString()))
{
int n=s.length();
int r=(n-1)/2;
String a=s.substring(0,r);
StringBuffer s2=new StringBuffer(a);
s2.reverse();
if(a.equals(s2.toString()))
{
int r1=(n+3)/2;
String b=s.substring(r1-1,n);
StringBuffer s3=new StringBuffer(b);
s3.reverse();
if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No");
}
else
System.out.println("No");
}
else
System.out.println("No");



}

} Main public static void main(String[] args) {
Scanner sc=new Scanner(System.in);

String s =sc.next();
StringBuffer s1=new StringBuffer(s);
s1.reverse();
if(s.equals(s1.toString()))
{
int n=s.length();
int r=(n-1)/2;
String a=s.substring(0,r);
StringBuffer s2=new StringBuffer(a);
s2.reverse();
if(a.equals(s2.toString()))
{
int r1=(n+3)/2;
String b=s.substring(r1-1,n);
StringBuffer s3=new StringBuffer(b);
s3.reverse();
if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No");
}
else
System.out.println("No");
}
else
System.out.println("No");



} main {
Scanner sc=new Scanner(System.in);

String s =sc.next();
StringBuffer s1=new StringBuffer(s);
s1.reverse();
if(s.equals(s1.toString()))
{
int n=s.length();
int r=(n-1)/2;
String a=s.substring(0,r);
StringBuffer s2=new StringBuffer(a);
s2.reverse();
if(a.equals(s2.toString()))
{
int r1=(n+3)/2;
String b=s.substring(r1-1,n);
StringBuffer s3=new StringBuffer(b);
s3.reverse();
if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No");
}
else
System.out.println("No");
}
else
System.out.println("No");



} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String s =sc.next(); s sc.next() sc.next sc StringBuffer s1=new StringBuffer(s); s1 new StringBuffer(s) s1.reverse() s1.reverse s1 if(s.equals(s1.toString()))
{
int n=s.length();
int r=(n-1)/2;
String a=s.substring(0,r);
StringBuffer s2=new StringBuffer(a);
s2.reverse();
if(a.equals(s2.toString()))
{
int r1=(n+3)/2;
String b=s.substring(r1-1,n);
StringBuffer s3=new StringBuffer(b);
s3.reverse();
if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No");
}
else
System.out.println("No");
}
else
System.out.println("No"); s.equals(s1.toString()) s.equals s s1.toString() s1.toString s1 {
int n=s.length();
int r=(n-1)/2;
String a=s.substring(0,r);
StringBuffer s2=new StringBuffer(a);
s2.reverse();
if(a.equals(s2.toString()))
{
int r1=(n+3)/2;
String b=s.substring(r1-1,n);
StringBuffer s3=new StringBuffer(b);
s3.reverse();
if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No");
}
else
System.out.println("No");
} int n=s.length(); n s.length() s.length s int r=(n-1)/2; r (n-1)/2 (n-1) n 1 2 String a=s.substring(0,r); a s.substring(0,r) s.substring s 0 r StringBuffer s2=new StringBuffer(a); s2 new StringBuffer(a) s2.reverse() s2.reverse s2 if(a.equals(s2.toString()))
{
int r1=(n+3)/2;
String b=s.substring(r1-1,n);
StringBuffer s3=new StringBuffer(b);
s3.reverse();
if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No");
}
else
System.out.println("No"); a.equals(s2.toString()) a.equals a s2.toString() s2.toString s2 {
int r1=(n+3)/2;
String b=s.substring(r1-1,n);
StringBuffer s3=new StringBuffer(b);
s3.reverse();
if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No");
} int r1=(n+3)/2; r1 (n+3)/2 (n+3) n 3 2 String b=s.substring(r1-1,n); b s.substring(r1-1,n) s.substring s r1-1 r1 1 n StringBuffer s3=new StringBuffer(b); s3 new StringBuffer(b) s3.reverse() s3.reverse s3 if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No"); b.equals(s3.toString()) b.equals b s3.toString() s3.toString s3 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" System.out.println("No") System.out.println System.out System System.out "No" System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);

String s =sc.next();
StringBuffer s1=new StringBuffer(s);
s1.reverse();
if(s.equals(s1.toString()))
{
int n=s.length();
int r=(n-1)/2;
String a=s.substring(0,r);
StringBuffer s2=new StringBuffer(a);
s2.reverse();
if(a.equals(s2.toString()))
{
int r1=(n+3)/2;
String b=s.substring(r1-1,n);
StringBuffer s3=new StringBuffer(b);
s3.reverse();
if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No");
}
else
System.out.println("No");
}
else
System.out.println("No");



}

} public class Main
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);

String s =sc.next();
StringBuffer s1=new StringBuffer(s);
s1.reverse();
if(s.equals(s1.toString()))
{
int n=s.length();
int r=(n-1)/2;
String a=s.substring(0,r);
StringBuffer s2=new StringBuffer(a);
s2.reverse();
if(a.equals(s2.toString()))
{
int r1=(n+3)/2;
String b=s.substring(r1-1,n);
StringBuffer s3=new StringBuffer(b);
s3.reverse();
if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No");
}
else
System.out.println("No");
}
else
System.out.println("No");



}

} Main
import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);

String s =sc.next();
StringBuffer s1=new StringBuffer(s);
s1.reverse();
if(s.equals(s1.toString()))
{
int n=s.length();
int r=(n-1)/2;
String a=s.substring(0,r);
StringBuffer s2=new StringBuffer(a);
s2.reverse();
if(a.equals(s2.toString()))
{
int r1=(n+3)/2;
String b=s.substring(r1-1,n);
StringBuffer s3=new StringBuffer(b);
s3.reverse();
if(b.equals(s3.toString()))
System.out.println("Yes");
else
System.out.println("No");
}
else
System.out.println("No");
}
else
System.out.println("No");



}

}