import java.io.*;
import java.util.*;
import java.lang.Math;

public class Main {
    static boolean check(String s){
        int n = s.length();
        for(int i = 0; i < n ; ++i){
            if(s.charAt(i) != s.charAt(n-1-i)){
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String a = s.substring(0, (n-1)/2);
        String b = s.substring((n+3)/2-1, n);
        String ans = "No";
        if(check(s) && check(a) && check(b)) ans = "Yes";
        System.out.println(ans);
    }
} import java.io.*; io.* java import java.util.*; util.* java import java.lang.Math; Math java.lang public class Main {
    static boolean check(String s){
        int n = s.length();
        for(int i = 0; i < n ; ++i){
            if(s.charAt(i) != s.charAt(n-1-i)){
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String a = s.substring(0, (n-1)/2);
        String b = s.substring((n+3)/2-1, n);
        String ans = "No";
        if(check(s) && check(a) && check(b)) ans = "Yes";
        System.out.println(ans);
    }
} Main static boolean check(String s){
        int n = s.length();
        for(int i = 0; i < n ; ++i){
            if(s.charAt(i) != s.charAt(n-1-i)){
                return false;
            }
        }
        return true;
    } check {
        int n = s.length();
        for(int i = 0; i < n ; ++i){
            if(s.charAt(i) != s.charAt(n-1-i)){
                return false;
            }
        }
        return true;
    } int n = s.length(); n s.length() s.length s for(int i = 0; i < n ; ++i){
            if(s.charAt(i) != s.charAt(n-1-i)){
                return false;
            }
        } int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
            if(s.charAt(i) != s.charAt(n-1-i)){
                return false;
            }
        } {
            if(s.charAt(i) != s.charAt(n-1-i)){
                return false;
            }
        } if(s.charAt(i) != s.charAt(n-1-i)){
                return false;
            } s.charAt(i) != s.charAt(n-1-i) s.charAt(i) s.charAt s i s.charAt(n-1-i) s.charAt s n-1-i n-1-i n 1 i {
                return false;
            } return false; false return true; true String s s public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String a = s.substring(0, (n-1)/2);
        String b = s.substring((n+3)/2-1, n);
        String ans = "No";
        if(check(s) && check(a) && check(b)) ans = "Yes";
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String a = s.substring(0, (n-1)/2);
        String b = s.substring((n+3)/2-1, n);
        String ans = "No";
        if(check(s) && check(a) && check(b)) ans = "Yes";
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int n = s.length(); n s.length() s.length s String a = s.substring(0, (n-1)/2); a s.substring(0, (n-1)/2) s.substring s 0 (n-1)/2 (n-1) n 1 2 String b = s.substring((n+3)/2-1, n); b s.substring((n+3)/2-1, n) s.substring s (n+3)/2-1 (n+3)/2 (n+3) n 3 2 1 n String ans = "No"; ans "No" if(check(s) && check(a) && check(b)) ans = "Yes"; check(s) && check(a) && check(b) check(s) && check(a) && check(b) check(s) check s check(a) check a check(b) check b ans = "Yes" ans "Yes" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    static boolean check(String s){
        int n = s.length();
        for(int i = 0; i < n ; ++i){
            if(s.charAt(i) != s.charAt(n-1-i)){
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String a = s.substring(0, (n-1)/2);
        String b = s.substring((n+3)/2-1, n);
        String ans = "No";
        if(check(s) && check(a) && check(b)) ans = "Yes";
        System.out.println(ans);
    }
} public class Main {
    static boolean check(String s){
        int n = s.length();
        for(int i = 0; i < n ; ++i){
            if(s.charAt(i) != s.charAt(n-1-i)){
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String a = s.substring(0, (n-1)/2);
        String b = s.substring((n+3)/2-1, n);
        String ans = "No";
        if(check(s) && check(a) && check(b)) ans = "Yes";
        System.out.println(ans);
    }
} Main
import java.io.*;
import java.util.*;
import java.lang.Math;

public class Main {
    static boolean check(String s){
        int n = s.length();
        for(int i = 0; i < n ; ++i){
            if(s.charAt(i) != s.charAt(n-1-i)){
                return false;
            }
        }
        return true;
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = s.length();
        String a = s.substring(0, (n-1)/2);
        String b = s.substring((n+3)/2-1, n);
        String ans = "No";
        if(check(s) && check(a) && check(b)) ans = "Yes";
        System.out.println(ans);
    }
}