import java.io.*;
import java.util.*;


public class Main {
    public static boolean checkPalindrom(String S,int start, int end){
        boolean isPalindrome=true;
        for (int i=start,j=end;i<j;i++,j--){
            if (S.charAt(i)!=S.charAt(j)){
                isPalindrome=false;
                break;
            }
        }
        return isPalindrome;
    }
    public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int N = S.length();
        boolean isPalindrome1=true;
        boolean isPalindrome2=true;
        boolean isPalindrome3=true;
        isPalindrome1=checkPalindrom(S,0,N-1);
        isPalindrome2=checkPalindrom(S,0,((N-1)/2)-1);
        isPalindrome3=checkPalindrom(S,((((N+3)/2)))-1,N-1);
        System.out.println(isPalindrome1&&isPalindrome2&&isPalindrome3? "Yes":"No");
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static boolean checkPalindrom(String S,int start, int end){
        boolean isPalindrome=true;
        for (int i=start,j=end;i<j;i++,j--){
            if (S.charAt(i)!=S.charAt(j)){
                isPalindrome=false;
                break;
            }
        }
        return isPalindrome;
    }
    public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int N = S.length();
        boolean isPalindrome1=true;
        boolean isPalindrome2=true;
        boolean isPalindrome3=true;
        isPalindrome1=checkPalindrom(S,0,N-1);
        isPalindrome2=checkPalindrom(S,0,((N-1)/2)-1);
        isPalindrome3=checkPalindrom(S,((((N+3)/2)))-1,N-1);
        System.out.println(isPalindrome1&&isPalindrome2&&isPalindrome3? "Yes":"No");
    }
} Main public static boolean checkPalindrom(String S,int start, int end){
        boolean isPalindrome=true;
        for (int i=start,j=end;i<j;i++,j--){
            if (S.charAt(i)!=S.charAt(j)){
                isPalindrome=false;
                break;
            }
        }
        return isPalindrome;
    } checkPalindrom {
        boolean isPalindrome=true;
        for (int i=start,j=end;i<j;i++,j--){
            if (S.charAt(i)!=S.charAt(j)){
                isPalindrome=false;
                break;
            }
        }
        return isPalindrome;
    } boolean isPalindrome=true; isPalindrome true for (int i=start,j=end;i<j;i++,j--){
            if (S.charAt(i)!=S.charAt(j)){
                isPalindrome=false;
                break;
            }
        } int i=start,j=end; int i=start i start j=end; j end i<j i j i++,j-- i++ i j-- j {
            if (S.charAt(i)!=S.charAt(j)){
                isPalindrome=false;
                break;
            }
        } {
            if (S.charAt(i)!=S.charAt(j)){
                isPalindrome=false;
                break;
            }
        } if (S.charAt(i)!=S.charAt(j)){
                isPalindrome=false;
                break;
            } S.charAt(i)!=S.charAt(j) S.charAt(i) S.charAt S i S.charAt(j) S.charAt S j {
                isPalindrome=false;
                break;
            } isPalindrome=false isPalindrome false break; return isPalindrome; isPalindrome String S S int start start int end end public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int N = S.length();
        boolean isPalindrome1=true;
        boolean isPalindrome2=true;
        boolean isPalindrome3=true;
        isPalindrome1=checkPalindrom(S,0,N-1);
        isPalindrome2=checkPalindrom(S,0,((N-1)/2)-1);
        isPalindrome3=checkPalindrom(S,((((N+3)/2)))-1,N-1);
        System.out.println(isPalindrome1&&isPalindrome2&&isPalindrome3? "Yes":"No");
    } main {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int N = S.length();
        boolean isPalindrome1=true;
        boolean isPalindrome2=true;
        boolean isPalindrome3=true;
        isPalindrome1=checkPalindrom(S,0,N-1);
        isPalindrome2=checkPalindrom(S,0,((N-1)/2)-1);
        isPalindrome3=checkPalindrom(S,((((N+3)/2)))-1,N-1);
        System.out.println(isPalindrome1&&isPalindrome2&&isPalindrome3? "Yes":"No");
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.next(); S scanner.next() scanner.next scanner int N = S.length(); N S.length() S.length S boolean isPalindrome1=true; isPalindrome1 true boolean isPalindrome2=true; isPalindrome2 true boolean isPalindrome3=true; isPalindrome3 true isPalindrome1=checkPalindrom(S,0,N-1) isPalindrome1 checkPalindrom(S,0,N-1) checkPalindrom S 0 N-1 N 1 isPalindrome2=checkPalindrom(S,0,((N-1)/2)-1) isPalindrome2 checkPalindrom(S,0,((N-1)/2)-1) checkPalindrom S 0 ((N-1)/2)-1 ((N-1)/2) (N-1) N 1 2 1 isPalindrome3=checkPalindrom(S,((((N+3)/2)))-1,N-1) isPalindrome3 checkPalindrom(S,((((N+3)/2)))-1,N-1) checkPalindrom S ((((N+3)/2)))-1 ((((N+3)/2))) (N+3) N 3 2 1 N-1 N 1 System.out.println(isPalindrome1&&isPalindrome2&&isPalindrome3? "Yes":"No") System.out.println System.out System System.out isPalindrome1&&isPalindrome2&&isPalindrome3? "Yes":"No" isPalindrome1&&isPalindrome2&&isPalindrome3 isPalindrome1&&isPalindrome2&&isPalindrome3 isPalindrome1 isPalindrome2 isPalindrome3 "Yes" "No" String[]args args public class Main {
    public static boolean checkPalindrom(String S,int start, int end){
        boolean isPalindrome=true;
        for (int i=start,j=end;i<j;i++,j--){
            if (S.charAt(i)!=S.charAt(j)){
                isPalindrome=false;
                break;
            }
        }
        return isPalindrome;
    }
    public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int N = S.length();
        boolean isPalindrome1=true;
        boolean isPalindrome2=true;
        boolean isPalindrome3=true;
        isPalindrome1=checkPalindrom(S,0,N-1);
        isPalindrome2=checkPalindrom(S,0,((N-1)/2)-1);
        isPalindrome3=checkPalindrom(S,((((N+3)/2)))-1,N-1);
        System.out.println(isPalindrome1&&isPalindrome2&&isPalindrome3? "Yes":"No");
    }
} public class Main {
    public static boolean checkPalindrom(String S,int start, int end){
        boolean isPalindrome=true;
        for (int i=start,j=end;i<j;i++,j--){
            if (S.charAt(i)!=S.charAt(j)){
                isPalindrome=false;
                break;
            }
        }
        return isPalindrome;
    }
    public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int N = S.length();
        boolean isPalindrome1=true;
        boolean isPalindrome2=true;
        boolean isPalindrome3=true;
        isPalindrome1=checkPalindrom(S,0,N-1);
        isPalindrome2=checkPalindrom(S,0,((N-1)/2)-1);
        isPalindrome3=checkPalindrom(S,((((N+3)/2)))-1,N-1);
        System.out.println(isPalindrome1&&isPalindrome2&&isPalindrome3? "Yes":"No");
    }
} Main
import java.io.*;
import java.util.*;


public class Main {
    public static boolean checkPalindrom(String S,int start, int end){
        boolean isPalindrome=true;
        for (int i=start,j=end;i<j;i++,j--){
            if (S.charAt(i)!=S.charAt(j)){
                isPalindrome=false;
                break;
            }
        }
        return isPalindrome;
    }
    public static void main (String[]args)throws IOException {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.next();
        int N = S.length();
        boolean isPalindrome1=true;
        boolean isPalindrome2=true;
        boolean isPalindrome3=true;
        isPalindrome1=checkPalindrom(S,0,N-1);
        isPalindrome2=checkPalindrom(S,0,((N-1)/2)-1);
        isPalindrome3=checkPalindrom(S,((((N+3)/2)))-1,N-1);
        System.out.println(isPalindrome1&&isPalindrome2&&isPalindrome3? "Yes":"No");
    }
}
