import java.util.*;

public class Main {


    public static void main(String [] commandLineArgument){

        Scanner input = new Scanner(System.in);
        String s = input.next();
        int n = s.length();
        int l = 0 , r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        l = 0 ;
        r = ((n - 1)/2) - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }

        l = ((n + 3)/2) - 1;
        r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
        input.close();
    }

    public static boolean isPalindrome(String s , int l , int r ){
        while(l < r){
            if(s.charAt(l++) != s.charAt(r--)){
                return false;
            }
        }
        return true;
    }
}
 import java.util.*; util.* java public class Main {


    public static void main(String [] commandLineArgument){

        Scanner input = new Scanner(System.in);
        String s = input.next();
        int n = s.length();
        int l = 0 , r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        l = 0 ;
        r = ((n - 1)/2) - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }

        l = ((n + 3)/2) - 1;
        r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
        input.close();
    }

    public static boolean isPalindrome(String s , int l , int r ){
        while(l < r){
            if(s.charAt(l++) != s.charAt(r--)){
                return false;
            }
        }
        return true;
    }
} Main public static void main(String [] commandLineArgument){

        Scanner input = new Scanner(System.in);
        String s = input.next();
        int n = s.length();
        int l = 0 , r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        l = 0 ;
        r = ((n - 1)/2) - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }

        l = ((n + 3)/2) - 1;
        r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
        input.close();
    } main {

        Scanner input = new Scanner(System.in);
        String s = input.next();
        int n = s.length();
        int l = 0 , r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        l = 0 ;
        r = ((n - 1)/2) - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }

        l = ((n + 3)/2) - 1;
        r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
        input.close();
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) String s = input.next(); s input.next() input.next input int n = s.length(); n s.length() s.length s int l = 0 l 0 r = n - 1; r n - 1 n 1 if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        } !isPalindrome(s , l , r) isPalindrome(s , l , r) isPalindrome s l r {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; l = 0 l 0 r = ((n - 1)/2) - 1 r ((n - 1)/2) - 1 ((n - 1)/2) (n - 1) n 1 2 1 if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        } !isPalindrome(s , l , r) isPalindrome(s , l , r) isPalindrome s l r {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; l = ((n + 3)/2) - 1 l ((n + 3)/2) - 1 ((n + 3)/2) (n + 3) n 3 2 1 r = n - 1 r n - 1 n 1 if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        } !isPalindrome(s , l , r) isPalindrome(s , l , r) isPalindrome s l r {
            System.out.println("No");
            return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" input.close() input.close input String [] commandLineArgument commandLineArgument public static boolean isPalindrome(String s , int l , int r ){
        while(l < r){
            if(s.charAt(l++) != s.charAt(r--)){
                return false;
            }
        }
        return true;
    } isPalindrome {
        while(l < r){
            if(s.charAt(l++) != s.charAt(r--)){
                return false;
            }
        }
        return true;
    } while(l < r){
            if(s.charAt(l++) != s.charAt(r--)){
                return false;
            }
        } l < r l r {
            if(s.charAt(l++) != s.charAt(r--)){
                return false;
            }
        } if(s.charAt(l++) != s.charAt(r--)){
                return false;
            } s.charAt(l++) != s.charAt(r--) s.charAt(l++) s.charAt s l++ l s.charAt(r--) s.charAt s r-- r {
                return false;
            } return false; false return true; true String s s int l l int r r public class Main {


    public static void main(String [] commandLineArgument){

        Scanner input = new Scanner(System.in);
        String s = input.next();
        int n = s.length();
        int l = 0 , r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        l = 0 ;
        r = ((n - 1)/2) - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }

        l = ((n + 3)/2) - 1;
        r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
        input.close();
    }

    public static boolean isPalindrome(String s , int l , int r ){
        while(l < r){
            if(s.charAt(l++) != s.charAt(r--)){
                return false;
            }
        }
        return true;
    }
} public class Main {


    public static void main(String [] commandLineArgument){

        Scanner input = new Scanner(System.in);
        String s = input.next();
        int n = s.length();
        int l = 0 , r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        l = 0 ;
        r = ((n - 1)/2) - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }

        l = ((n + 3)/2) - 1;
        r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
        input.close();
    }

    public static boolean isPalindrome(String s , int l , int r ){
        while(l < r){
            if(s.charAt(l++) != s.charAt(r--)){
                return false;
            }
        }
        return true;
    }
} Main
import java.util.*;

public class Main {


    public static void main(String [] commandLineArgument){

        Scanner input = new Scanner(System.in);
        String s = input.next();
        int n = s.length();
        int l = 0 , r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        l = 0 ;
        r = ((n - 1)/2) - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }

        l = ((n + 3)/2) - 1;
        r = n - 1;
        if(!isPalindrome(s , l , r)){
            System.out.println("No");
            return;
        }
        System.out.println("Yes");
        input.close();
    }

    public static boolean isPalindrome(String s , int l , int r ){
        while(l < r){
            if(s.charAt(l++) != s.charAt(r--)){
                return false;
            }
        }
        return true;
    }
}

