import java.util.Scanner;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        
        String[] sArray = new String[S.length()];
        for(int i = 0; i < S.length(); i++){
            String s2 = String.valueOf(S.charAt(i));
            sArray[i] = s2;
        }
        
        for(int i = 0; i < (S.length()-1)/2; i++){
            //System.out.print(i);
            if(sArray[i].equals(sArray[S.length() - (1+i)])){
                //続行
            }else{
                System.out.print("No");
                a++;
                b++;
                break;
            }
        }
        //System.out.print("a="+ a + " 長さ=" + (S.length()-1)/2);
        int N = S.length() - 1;
        if(a == 0){
            for(int i = 0; i < (S.length()-1)/4; i++){
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            }
        }
        
        if(b == 0){
            System.out.print("Yes");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        
        String[] sArray = new String[S.length()];
        for(int i = 0; i < S.length(); i++){
            String s2 = String.valueOf(S.charAt(i));
            sArray[i] = s2;
        }
        
        for(int i = 0; i < (S.length()-1)/2; i++){
            //System.out.print(i);
            if(sArray[i].equals(sArray[S.length() - (1+i)])){
                //続行
            }else{
                System.out.print("No");
                a++;
                b++;
                break;
            }
        }
        //System.out.print("a="+ a + " 長さ=" + (S.length()-1)/2);
        int N = S.length() - 1;
        if(a == 0){
            for(int i = 0; i < (S.length()-1)/4; i++){
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            }
        }
        
        if(b == 0){
            System.out.print("Yes");
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        
        String[] sArray = new String[S.length()];
        for(int i = 0; i < S.length(); i++){
            String s2 = String.valueOf(S.charAt(i));
            sArray[i] = s2;
        }
        
        for(int i = 0; i < (S.length()-1)/2; i++){
            //System.out.print(i);
            if(sArray[i].equals(sArray[S.length() - (1+i)])){
                //続行
            }else{
                System.out.print("No");
                a++;
                b++;
                break;
            }
        }
        //System.out.print("a="+ a + " 長さ=" + (S.length()-1)/2);
        int N = S.length() - 1;
        if(a == 0){
            for(int i = 0; i < (S.length()-1)/4; i++){
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            }
        }
        
        if(b == 0){
            System.out.print("Yes");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        
        String[] sArray = new String[S.length()];
        for(int i = 0; i < S.length(); i++){
            String s2 = String.valueOf(S.charAt(i));
            sArray[i] = s2;
        }
        
        for(int i = 0; i < (S.length()-1)/2; i++){
            //System.out.print(i);
            if(sArray[i].equals(sArray[S.length() - (1+i)])){
                //続行
            }else{
                System.out.print("No");
                a++;
                b++;
                break;
            }
        }
        //System.out.print("a="+ a + " 長さ=" + (S.length()-1)/2);
        int N = S.length() - 1;
        if(a == 0){
            for(int i = 0; i < (S.length()-1)/4; i++){
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            }
        }
        
        if(b == 0){
            System.out.print("Yes");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int a = 0; a 0 int b = 0; b 0 String[] sArray = new String[S.length()]; sArray new String[S.length()] S.length() S.length S for(int i = 0; i < S.length(); i++){
            String s2 = String.valueOf(S.charAt(i));
            sArray[i] = s2;
        } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
            String s2 = String.valueOf(S.charAt(i));
            sArray[i] = s2;
        } {
            String s2 = String.valueOf(S.charAt(i));
            sArray[i] = s2;
        } String s2 = String.valueOf(S.charAt(i)); s2 String.valueOf(S.charAt(i)) String.valueOf String S.charAt(i) S.charAt S i sArray[i] = s2 sArray[i] sArray i s2 for(int i = 0; i < (S.length()-1)/2; i++){
            //System.out.print(i);
            if(sArray[i].equals(sArray[S.length() - (1+i)])){
                //続行
            }else{
                System.out.print("No");
                a++;
                b++;
                break;
            }
        } int i = 0; int i = 0; i 0 i < (S.length()-1)/2 i (S.length()-1)/2 (S.length()-1) S.length() S.length S 1 2 i++ i++ i {
            //System.out.print(i);
            if(sArray[i].equals(sArray[S.length() - (1+i)])){
                //続行
            }else{
                System.out.print("No");
                a++;
                b++;
                break;
            }
        } {
            //System.out.print(i);
            if(sArray[i].equals(sArray[S.length() - (1+i)])){
                //続行
            }else{
                System.out.print("No");
                a++;
                b++;
                break;
            }
        } if(sArray[i].equals(sArray[S.length() - (1+i)])){
                //続行
            }else{
                System.out.print("No");
                a++;
                b++;
                break;
            } sArray[i].equals(sArray[S.length() - (1+i)]) sArray[i].equals sArray[i] sArray i sArray[S.length() - (1+i)] sArray S.length() - (1+i) S.length() S.length S (1+i) 1 i {
                //続行
            } {
                System.out.print("No");
                a++;
                b++;
                break;
            } System.out.print("No") System.out.print System.out System System.out "No" a++ a b++ b break; int N = S.length() - 1; N S.length() - 1 S.length() S.length S 1 if(a == 0){
            for(int i = 0; i < (S.length()-1)/4; i++){
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            }
        } a == 0 a 0 {
            for(int i = 0; i < (S.length()-1)/4; i++){
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            }
        } for(int i = 0; i < (S.length()-1)/4; i++){
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            } int i = 0; int i = 0; i 0 i < (S.length()-1)/4 i (S.length()-1)/4 (S.length()-1) S.length() S.length S 1 4 i++ i++ i {
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            } {
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            } if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            } sArray[i].equals(sArray[(N / 2) - (1 + i)]) sArray[i].equals sArray[i] sArray i sArray[(N / 2) - (1 + i)] sArray (N / 2) - (1 + i) (N / 2) N 2 (1 + i) 1 i {
                //続行
            } {
                System.out.print("No");
                b++;
                break;
            } System.out.print("No") System.out.print System.out System System.out "No" b++ b break; if(b == 0){
            System.out.print("Yes");
        } b == 0 b 0 {
            System.out.print("Yes");
        } System.out.print("Yes") System.out.print System.out System System.out "Yes" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        
        String[] sArray = new String[S.length()];
        for(int i = 0; i < S.length(); i++){
            String s2 = String.valueOf(S.charAt(i));
            sArray[i] = s2;
        }
        
        for(int i = 0; i < (S.length()-1)/2; i++){
            //System.out.print(i);
            if(sArray[i].equals(sArray[S.length() - (1+i)])){
                //続行
            }else{
                System.out.print("No");
                a++;
                b++;
                break;
            }
        }
        //System.out.print("a="+ a + " 長さ=" + (S.length()-1)/2);
        int N = S.length() - 1;
        if(a == 0){
            for(int i = 0; i < (S.length()-1)/4; i++){
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            }
        }
        
        if(b == 0){
            System.out.print("Yes");
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        
        String[] sArray = new String[S.length()];
        for(int i = 0; i < S.length(); i++){
            String s2 = String.valueOf(S.charAt(i));
            sArray[i] = s2;
        }
        
        for(int i = 0; i < (S.length()-1)/2; i++){
            //System.out.print(i);
            if(sArray[i].equals(sArray[S.length() - (1+i)])){
                //続行
            }else{
                System.out.print("No");
                a++;
                b++;
                break;
            }
        }
        //System.out.print("a="+ a + " 長さ=" + (S.length()-1)/2);
        int N = S.length() - 1;
        if(a == 0){
            for(int i = 0; i < (S.length()-1)/4; i++){
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            }
        }
        
        if(b == 0){
            System.out.print("Yes");
        }
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int a = 0;
        int b = 0;
        
        String[] sArray = new String[S.length()];
        for(int i = 0; i < S.length(); i++){
            String s2 = String.valueOf(S.charAt(i));
            sArray[i] = s2;
        }
        
        for(int i = 0; i < (S.length()-1)/2; i++){
            //System.out.print(i);
            if(sArray[i].equals(sArray[S.length() - (1+i)])){
                //続行
            }else{
                System.out.print("No");
                a++;
                b++;
                break;
            }
        }
        //System.out.print("a="+ a + " 長さ=" + (S.length()-1)/2);
        int N = S.length() - 1;
        if(a == 0){
            for(int i = 0; i < (S.length()-1)/4; i++){
                if(sArray[i].equals(sArray[(N / 2) - (1 + i)])){
                //続行
            }else{
                System.out.print("No");
                b++;
                break;
            }
            }
        }
        
        if(b == 0){
            System.out.print("Yes");
        }
    }
}