import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int b = 0;
        for(int i = 0; i < (s.length() - 1) / 2; i++){
            if(s.charAt(i) == s.charAt(s.length() - i - 1)){
                a++;
            } 
        }
        if(a != (s.length() - 1) / 2){
                System.out.println("No");
                System.exit(0);
        }
        for(int i = 0; i < (s.length() - 1) / 4; i++){
            if(s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i)){
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            }
        }
        if(b != s.length() / 4){
            System.out.println("No");
            System.exit(0);
        }
        System.out.println("Yes");
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int b = 0;
        for(int i = 0; i < (s.length() - 1) / 2; i++){
            if(s.charAt(i) == s.charAt(s.length() - i - 1)){
                a++;
            } 
        }
        if(a != (s.length() - 1) / 2){
                System.out.println("No");
                System.exit(0);
        }
        for(int i = 0; i < (s.length() - 1) / 4; i++){
            if(s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i)){
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            }
        }
        if(b != s.length() / 4){
            System.out.println("No");
            System.exit(0);
        }
        System.out.println("Yes");
    }
} Main public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int b = 0;
        for(int i = 0; i < (s.length() - 1) / 2; i++){
            if(s.charAt(i) == s.charAt(s.length() - i - 1)){
                a++;
            } 
        }
        if(a != (s.length() - 1) / 2){
                System.out.println("No");
                System.exit(0);
        }
        for(int i = 0; i < (s.length() - 1) / 4; i++){
            if(s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i)){
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            }
        }
        if(b != s.length() / 4){
            System.out.println("No");
            System.exit(0);
        }
        System.out.println("Yes");
    } main {
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int b = 0;
        for(int i = 0; i < (s.length() - 1) / 2; i++){
            if(s.charAt(i) == s.charAt(s.length() - i - 1)){
                a++;
            } 
        }
        if(a != (s.length() - 1) / 2){
                System.out.println("No");
                System.exit(0);
        }
        for(int i = 0; i < (s.length() - 1) / 4; i++){
            if(s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i)){
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            }
        }
        if(b != s.length() / 4){
            System.out.println("No");
            System.exit(0);
        }
        System.out.println("Yes");
    } Scanner scan = new java.util.Scanner(System.in); scan new java.util.Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan int a = 0; a 0 int b = 0; b 0 for(int i = 0; i < (s.length() - 1) / 2; i++){
            if(s.charAt(i) == s.charAt(s.length() - i - 1)){
                a++;
            } 
        } 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 {
            if(s.charAt(i) == s.charAt(s.length() - i - 1)){
                a++;
            } 
        } {
            if(s.charAt(i) == s.charAt(s.length() - i - 1)){
                a++;
            } 
        } if(s.charAt(i) == s.charAt(s.length() - i - 1)){
                a++;
            } s.charAt(i) == s.charAt(s.length() - i - 1) s.charAt(i) s.charAt s i s.charAt(s.length() - i - 1) s.charAt s s.length() - i - 1 s.length() - i - 1 s.length() s.length s i 1 {
                a++;
            } a++ a if(a != (s.length() - 1) / 2){
                System.out.println("No");
                System.exit(0);
        } a != (s.length() - 1) / 2 a (s.length() - 1) / 2 (s.length() - 1) s.length() s.length s 1 2 {
                System.out.println("No");
                System.exit(0);
        } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 for(int i = 0; i < (s.length() - 1) / 4; i++){
            if(s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i)){
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            }
        } 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(s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i)){
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            }
        } {
            if(s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i)){
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            }
        } if(s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i)){
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            } s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i) s.charAt(i) s.charAt s i s.charAt((s.length() - 1) / 2 - 1 - i) s.charAt s (s.length() - 1) / 2 - 1 - i (s.length() - 1) / 2 - 1 - i (s.length() - 1) / 2 (s.length() - 1) s.length() s.length s 1 2 1 i {
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            } if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                } s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1) s.charAt((s.length() + 3) / 2 - 1 + i) s.charAt s (s.length() + 3) / 2 - 1 + i (s.length() + 3) / 2 - 1 (s.length() + 3) / 2 (s.length() + 3) s.length() s.length s 3 2 1 i s.charAt(s.length() - i - 1) s.charAt s s.length() - i - 1 s.length() - i - 1 s.length() s.length s i 1 {
                    b++; 
                } b++ b if(b != s.length() / 4){
            System.out.println("No");
            System.exit(0);
        } b != s.length() / 4 b s.length() / 4 s.length() s.length s 4 {
            System.out.println("No");
            System.exit(0);
        } System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int b = 0;
        for(int i = 0; i < (s.length() - 1) / 2; i++){
            if(s.charAt(i) == s.charAt(s.length() - i - 1)){
                a++;
            } 
        }
        if(a != (s.length() - 1) / 2){
                System.out.println("No");
                System.exit(0);
        }
        for(int i = 0; i < (s.length() - 1) / 4; i++){
            if(s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i)){
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            }
        }
        if(b != s.length() / 4){
            System.out.println("No");
            System.exit(0);
        }
        System.out.println("Yes");
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int b = 0;
        for(int i = 0; i < (s.length() - 1) / 2; i++){
            if(s.charAt(i) == s.charAt(s.length() - i - 1)){
                a++;
            } 
        }
        if(a != (s.length() - 1) / 2){
                System.out.println("No");
                System.exit(0);
        }
        for(int i = 0; i < (s.length() - 1) / 4; i++){
            if(s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i)){
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            }
        }
        if(b != s.length() / 4){
            System.out.println("No");
            System.exit(0);
        }
        System.out.println("Yes");
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new java.util.Scanner(System.in);
        String s = scan.next();
        int a = 0;
        int b = 0;
        for(int i = 0; i < (s.length() - 1) / 2; i++){
            if(s.charAt(i) == s.charAt(s.length() - i - 1)){
                a++;
            } 
        }
        if(a != (s.length() - 1) / 2){
                System.out.println("No");
                System.exit(0);
        }
        for(int i = 0; i < (s.length() - 1) / 4; i++){
            if(s.charAt(i) == s.charAt((s.length() - 1) / 2 - 1 - i)){
                if(s.charAt((s.length() + 3) / 2 - 1 + i) == s.charAt(s.length() - i - 1)){
                    b++; 
                }
            }
        }
        if(b != s.length() / 4){
            System.out.println("No");
            System.exit(0);
        }
        System.out.println("Yes");
    }
}