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

//294784RY

public class Main {
    public static PrintStream out = new PrintStream(System.out);
    static LinkedList<Integer> adj[];
    static boolean[] vis;
    static final int nINF = Integer.MIN_VALUE;
    static final int INF = Integer.MAX_VALUE;
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        boolean ok = true;
        int l = 0; int r = s.length() - 1;
        while(l < r){
            if(c[l] != c[r]){
                //out.println("A");
                ok = false;
                break;
            }
            l++; r--;
        }
        if(!ok) out.println("No");
        else {
            int n = c.length;
            l = 0; r = ((n - 1) / 2) - 1 ;
            while(l < r) {
                if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              }
              l++; r--;              
            }
            if(!ok) out.println("No");
            else {
            l = ((n + 3) / 2) - 1 ; r = n - 1;
                while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                }
                if(!ok) out.println("No");
                else out.println("Yes");
                
            }
        }
        

    }
    
    static void initAdj(int n){
        adj = new LinkedList[n + 2];
        for(int i = 0; i <= n + 1; i++)
            adj[i] = new LinkedList();
    }    
    
    static void dfs(int n){
        Iterator<Integer> i = adj[n].listIterator();
        while(i.hasNext()){
            Integer a = i.next();
            if(!vis[a]){
                vis[a] = true;
                dfs(a);
            }
        }
    }
    
    static ArrayList<Integer> sieve(int n){
        boolean prime[] = new boolean[n+1]; 
        ArrayList<Integer> res = new ArrayList();
        for(int i=0;i<n;i++) 
            prime[i] = true; 
          
        for(int p = 2; p*p <=n; p++) 
        { 
            // If prime[p] is not changed, then it is a prime 
            if(prime[p] == true) 
            { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } 

        for(int i = 2; i <= n; i++) 
        { 
            if(prime[i] == true) 
                res.add(i);
        }
        return res;
    }
    
    //returns index; outputs earliest occurence; -1 if target value does not exist
    static int getUpper(int[] arr, int target)  
    {  
        int start = 0, end = arr.length - 1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to right side if target is  
            // greater.  
            if (arr[mid] <= target) {  
                start = mid + 1;  
            }  
    
            // Move left side.  
            else {  
                ans = mid;  
                end = mid - 1;  
            }  
        }  
        return ans;  
    }  
    
    //returns index; outputs latest occurence; -1 if target value does not exist
    static int getLower(int[] arr, int target)  
    {  
        int start = 0, end = arr.length-1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to the left side if the target is smaller  
            if (arr[mid] >= target) {  
                end = mid - 1;  
            }  
    
            // Move right side  
            else {  
                ans = mid;  
                start = mid + 1;  
            }  
        }  
        return ans;  
    }  
     
   

    static String removeLastChar(String ss) {
        if (ss == null || ss.length() == 0) {
            return ss;
        }
        return ss.substring(0, ss.length()-1);
    }
    
    static void solveLunLun(){
        FastScanner sc = new FastScanner();
        Queue<Long> q = new ArrayDeque();
        for(int i = 1; i <= 9; i++){
            q.add((long) i);
        }
        int k = sc.nextInt();
        int cnt = 0;
        long x = 1;
        while(cnt < k){
            x = q.poll();
            cnt++;
            if(cnt >= k) break;
            
            long d = x % (long) 10;
            if(d == 0){
                q.add( (10 * x));
                q.add( (10 * x) + d + 1 );
            }
            else if (d == 9){
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            }
            else {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            }
        }
        out.println(x);

    }
    
    private static int factorial(int n){
            int fac = 1;
            for(int i=2;i<=n;i++){
                    fac *= i;
            }
 
            return fac;
    }
    
    private static boolean isPrime(int n){
            if(n == 0 || n == 1){
                    return false;
            }else if(n%2 == 0){
                    return false;
            }else{
                    int x = (int)(Math.sqrt(n)) + 1;
                    for(int i=3;i<=x;i+=2){
                            if(n % i == 0){
                                    return false;
                            }
                    }
                    return true;
            }
    }
 
    private static long pow(int base,int exp){
            if(exp == 0){
                    return 1;
            }else if(exp == 1){
                    return base;
            }else{
                    long a = pow(base,exp/2);
                    if(exp%2 == 0){
                            return a * a;
                    }else{
                            return a * a * base;
                    }
            }
 
    }
 
    private static int gcd(int a,int b){
            if(a == 0){
                    return b;
            }
 
            return gcd(b%a,a);
    }
 
    private static int lcm(int a,int b){
            return (a * b)/gcd(a,b);
    }
    
//    private static ArrayList<Integer> primeSieve(int n){
//        boolean b[] = new boolean[n+1];
//        b[0] = true;
//        b[1] = true;
//        for(int i=2;i<=5;i++){
//                int j = 2;
//                while(i * j <= n && !b[i]){
//                        b[i * j] = true;
//                        j++;
//                }
//        }
// 
//        ArrayList<Integer> arr = new ArrayList<>();
//        for(int i=2;i<n+1;i++){
//                if(!b[i]){
//                        arr.add(i);
//                }
//        }
// 
//        return arr;
//    }   
    
    private static int BSearch(int target, int[] arr){
        int index = -1;
        int l = 0;
        int r = arr.length - 1;
        
        while(l <= r){
            int mid = (l + r) / 2;
            if(arr[mid] <= target){
                index = mid;
                l = mid + 1;
            } else{
                r = mid - 1;    
            }
        }
        
        return index;
    }
        
 
}


class FastScanner { 
    BufferedReader br; 
    StringTokenizer st; 

    public FastScanner() 
    { 
        br = new BufferedReader(new
                 InputStreamReader(System.in)); 
    } 

    String next() 
    { 
        while (st == null || !st.hasMoreElements()) 
        { 
            try
            { 
                st = new StringTokenizer(br.readLine()); 
            } 
            catch (IOException  e) 
            { 
                e.printStackTrace(); 
            } 
        } 
        return st.nextToken(); 
    } 

    int nextInt() 
    { 
        return Integer.parseInt(next()); 
    } 

    long nextLong() 
    { 
        return Long.parseLong(next()); 
    } 

    double nextDouble() 
    { 
        return Double.parseDouble(next()); 
    } 

    String nextLine() 
    { 
        String str = ""; 
        try
        { 
            str = br.readLine(); 
        } 
        catch (IOException e) 
        { 
            e.printStackTrace(); 
        } 
        return str; 
    } 

    int[] nextIntArray(int length) {
       int[] arr = new int[length];
       for (int i = 0; i < length; i++)
           arr[i] = nextInt();
       return arr;
   }
} 

class Node
{
    public int V;
    public Node(int v)
    {
        this.V=v;
    }
}


 import java.util.*; util.* java import java.io.*; io.* java public class Main {
    public static PrintStream out = new PrintStream(System.out);
    static LinkedList<Integer> adj[];
    static boolean[] vis;
    static final int nINF = Integer.MIN_VALUE;
    static final int INF = Integer.MAX_VALUE;
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        boolean ok = true;
        int l = 0; int r = s.length() - 1;
        while(l < r){
            if(c[l] != c[r]){
                //out.println("A");
                ok = false;
                break;
            }
            l++; r--;
        }
        if(!ok) out.println("No");
        else {
            int n = c.length;
            l = 0; r = ((n - 1) / 2) - 1 ;
            while(l < r) {
                if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              }
              l++; r--;              
            }
            if(!ok) out.println("No");
            else {
            l = ((n + 3) / 2) - 1 ; r = n - 1;
                while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                }
                if(!ok) out.println("No");
                else out.println("Yes");
                
            }
        }
        

    }
    
    static void initAdj(int n){
        adj = new LinkedList[n + 2];
        for(int i = 0; i <= n + 1; i++)
            adj[i] = new LinkedList();
    }    
    
    static void dfs(int n){
        Iterator<Integer> i = adj[n].listIterator();
        while(i.hasNext()){
            Integer a = i.next();
            if(!vis[a]){
                vis[a] = true;
                dfs(a);
            }
        }
    }
    
    static ArrayList<Integer> sieve(int n){
        boolean prime[] = new boolean[n+1]; 
        ArrayList<Integer> res = new ArrayList();
        for(int i=0;i<n;i++) 
            prime[i] = true; 
          
        for(int p = 2; p*p <=n; p++) 
        { 
            // If prime[p] is not changed, then it is a prime 
            if(prime[p] == true) 
            { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } 

        for(int i = 2; i <= n; i++) 
        { 
            if(prime[i] == true) 
                res.add(i);
        }
        return res;
    }
    
    //returns index; outputs earliest occurence; -1 if target value does not exist
    static int getUpper(int[] arr, int target)  
    {  
        int start = 0, end = arr.length - 1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to right side if target is  
            // greater.  
            if (arr[mid] <= target) {  
                start = mid + 1;  
            }  
    
            // Move left side.  
            else {  
                ans = mid;  
                end = mid - 1;  
            }  
        }  
        return ans;  
    }  
    
    //returns index; outputs latest occurence; -1 if target value does not exist
    static int getLower(int[] arr, int target)  
    {  
        int start = 0, end = arr.length-1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to the left side if the target is smaller  
            if (arr[mid] >= target) {  
                end = mid - 1;  
            }  
    
            // Move right side  
            else {  
                ans = mid;  
                start = mid + 1;  
            }  
        }  
        return ans;  
    }  
     
   

    static String removeLastChar(String ss) {
        if (ss == null || ss.length() == 0) {
            return ss;
        }
        return ss.substring(0, ss.length()-1);
    }
    
    static void solveLunLun(){
        FastScanner sc = new FastScanner();
        Queue<Long> q = new ArrayDeque();
        for(int i = 1; i <= 9; i++){
            q.add((long) i);
        }
        int k = sc.nextInt();
        int cnt = 0;
        long x = 1;
        while(cnt < k){
            x = q.poll();
            cnt++;
            if(cnt >= k) break;
            
            long d = x % (long) 10;
            if(d == 0){
                q.add( (10 * x));
                q.add( (10 * x) + d + 1 );
            }
            else if (d == 9){
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            }
            else {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            }
        }
        out.println(x);

    }
    
    private static int factorial(int n){
            int fac = 1;
            for(int i=2;i<=n;i++){
                    fac *= i;
            }
 
            return fac;
    }
    
    private static boolean isPrime(int n){
            if(n == 0 || n == 1){
                    return false;
            }else if(n%2 == 0){
                    return false;
            }else{
                    int x = (int)(Math.sqrt(n)) + 1;
                    for(int i=3;i<=x;i+=2){
                            if(n % i == 0){
                                    return false;
                            }
                    }
                    return true;
            }
    }
 
    private static long pow(int base,int exp){
            if(exp == 0){
                    return 1;
            }else if(exp == 1){
                    return base;
            }else{
                    long a = pow(base,exp/2);
                    if(exp%2 == 0){
                            return a * a;
                    }else{
                            return a * a * base;
                    }
            }
 
    }
 
    private static int gcd(int a,int b){
            if(a == 0){
                    return b;
            }
 
            return gcd(b%a,a);
    }
 
    private static int lcm(int a,int b){
            return (a * b)/gcd(a,b);
    }
    
//    private static ArrayList<Integer> primeSieve(int n){
//        boolean b[] = new boolean[n+1];
//        b[0] = true;
//        b[1] = true;
//        for(int i=2;i<=5;i++){
//                int j = 2;
//                while(i * j <= n && !b[i]){
//                        b[i * j] = true;
//                        j++;
//                }
//        }
// 
//        ArrayList<Integer> arr = new ArrayList<>();
//        for(int i=2;i<n+1;i++){
//                if(!b[i]){
//                        arr.add(i);
//                }
//        }
// 
//        return arr;
//    }   
    
    private static int BSearch(int target, int[] arr){
        int index = -1;
        int l = 0;
        int r = arr.length - 1;
        
        while(l <= r){
            int mid = (l + r) / 2;
            if(arr[mid] <= target){
                index = mid;
                l = mid + 1;
            } else{
                r = mid - 1;    
            }
        }
        
        return index;
    }
        
 
} Main public static PrintStream out = new PrintStream(System.out); out new PrintStream(System.out) static LinkedList<Integer> adj[]; adj static boolean[] vis; vis static final int nINF = Integer.MIN_VALUE; nINF Integer.MIN_VALUE Integer Integer.MIN_VALUE static final int INF = Integer.MAX_VALUE; INF Integer.MAX_VALUE Integer Integer.MAX_VALUE public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        boolean ok = true;
        int l = 0; int r = s.length() - 1;
        while(l < r){
            if(c[l] != c[r]){
                //out.println("A");
                ok = false;
                break;
            }
            l++; r--;
        }
        if(!ok) out.println("No");
        else {
            int n = c.length;
            l = 0; r = ((n - 1) / 2) - 1 ;
            while(l < r) {
                if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              }
              l++; r--;              
            }
            if(!ok) out.println("No");
            else {
            l = ((n + 3) / 2) - 1 ; r = n - 1;
                while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                }
                if(!ok) out.println("No");
                else out.println("Yes");
                
            }
        }
        

    } main {
        FastScanner sc = new FastScanner();
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        boolean ok = true;
        int l = 0; int r = s.length() - 1;
        while(l < r){
            if(c[l] != c[r]){
                //out.println("A");
                ok = false;
                break;
            }
            l++; r--;
        }
        if(!ok) out.println("No");
        else {
            int n = c.length;
            l = 0; r = ((n - 1) / 2) - 1 ;
            while(l < r) {
                if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              }
              l++; r--;              
            }
            if(!ok) out.println("No");
            else {
            l = ((n + 3) / 2) - 1 ; r = n - 1;
                while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                }
                if(!ok) out.println("No");
                else out.println("Yes");
                
            }
        }
        

    } FastScanner sc = new FastScanner(); sc new FastScanner() String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc char[] c = s.toCharArray(); c s.toCharArray() s.toCharArray s boolean ok = true; ok true int l = 0; l 0 int r = s.length() - 1; r s.length() - 1 s.length() s.length s 1 while(l < r){
            if(c[l] != c[r]){
                //out.println("A");
                ok = false;
                break;
            }
            l++; r--;
        } l < r l r {
            if(c[l] != c[r]){
                //out.println("A");
                ok = false;
                break;
            }
            l++; r--;
        } if(c[l] != c[r]){
                //out.println("A");
                ok = false;
                break;
            } c[l] != c[r] c[l] c l c[r] c r {
                //out.println("A");
                ok = false;
                break;
            } ok = false ok false break; l++ l r-- r if(!ok) out.println("No");
        else {
            int n = c.length;
            l = 0; r = ((n - 1) / 2) - 1 ;
            while(l < r) {
                if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              }
              l++; r--;              
            }
            if(!ok) out.println("No");
            else {
            l = ((n + 3) / 2) - 1 ; r = n - 1;
                while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                }
                if(!ok) out.println("No");
                else out.println("Yes");
                
            }
        } !ok ok out.println("No") out.println out "No" {
            int n = c.length;
            l = 0; r = ((n - 1) / 2) - 1 ;
            while(l < r) {
                if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              }
              l++; r--;              
            }
            if(!ok) out.println("No");
            else {
            l = ((n + 3) / 2) - 1 ; r = n - 1;
                while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                }
                if(!ok) out.println("No");
                else out.println("Yes");
                
            }
        } int n = c.length; n c.length c c.length l = 0 l 0 r = ((n - 1) / 2) - 1 r ((n - 1) / 2) - 1 ((n - 1) / 2) (n - 1) n 1 2 1 while(l < r) {
                if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              }
              l++; r--;              
            } l < r l r {
                if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              }
              l++; r--;              
            } if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              } c[l] != c[r] c[l] c l c[r] c r {
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              } ok = false ok false break; l++ l r-- r if(!ok) out.println("No");
            else {
            l = ((n + 3) / 2) - 1 ; r = n - 1;
                while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                }
                if(!ok) out.println("No");
                else out.println("Yes");
                
            } !ok ok out.println("No") out.println out "No" {
            l = ((n + 3) / 2) - 1 ; r = n - 1;
                while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                }
                if(!ok) out.println("No");
                else out.println("Yes");
                
            } 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 while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                } l < r l r {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                } if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  } c[l] != c[r] c[l] c l c[r] c r {
                     // out.println("C");
                      ok = false;
                      break;
                  } ok = false ok false break; l++ l r-- r if(!ok) out.println("No");
                else out.println("Yes"); !ok ok out.println("No") out.println out "No" out.println("Yes") out.println out "Yes" String[] args args static void initAdj(int n){
        adj = new LinkedList[n + 2];
        for(int i = 0; i <= n + 1; i++)
            adj[i] = new LinkedList();
    } initAdj {
        adj = new LinkedList[n + 2];
        for(int i = 0; i <= n + 1; i++)
            adj[i] = new LinkedList();
    } adj = new LinkedList[n + 2] adj new LinkedList[n + 2] n + 2 n 2 for(int i = 0; i <= n + 1; i++)
            adj[i] = new LinkedList(); int i = 0; int i = 0; i 0 i <= n + 1 i n + 1 n 1 i++ i++ i adj[i] = new LinkedList(); adj[i] = new LinkedList() adj[i] adj i new LinkedList() int n n static void dfs(int n){
        Iterator<Integer> i = adj[n].listIterator();
        while(i.hasNext()){
            Integer a = i.next();
            if(!vis[a]){
                vis[a] = true;
                dfs(a);
            }
        }
    } dfs {
        Iterator<Integer> i = adj[n].listIterator();
        while(i.hasNext()){
            Integer a = i.next();
            if(!vis[a]){
                vis[a] = true;
                dfs(a);
            }
        }
    } Iterator<Integer> i = adj[n].listIterator(); i adj[n].listIterator() adj[n].listIterator adj[n] adj n while(i.hasNext()){
            Integer a = i.next();
            if(!vis[a]){
                vis[a] = true;
                dfs(a);
            }
        } i.hasNext() i.hasNext i {
            Integer a = i.next();
            if(!vis[a]){
                vis[a] = true;
                dfs(a);
            }
        } Integer a = i.next(); a i.next() i.next i if(!vis[a]){
                vis[a] = true;
                dfs(a);
            } !vis[a] vis[a] vis a {
                vis[a] = true;
                dfs(a);
            } vis[a] = true vis[a] vis a true dfs(a) dfs a int n n static ArrayList<Integer> sieve(int n){
        boolean prime[] = new boolean[n+1]; 
        ArrayList<Integer> res = new ArrayList();
        for(int i=0;i<n;i++) 
            prime[i] = true; 
          
        for(int p = 2; p*p <=n; p++) 
        { 
            // If prime[p] is not changed, then it is a prime 
            if(prime[p] == true) 
            { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } 

        for(int i = 2; i <= n; i++) 
        { 
            if(prime[i] == true) 
                res.add(i);
        }
        return res;
    } sieve {
        boolean prime[] = new boolean[n+1]; 
        ArrayList<Integer> res = new ArrayList();
        for(int i=0;i<n;i++) 
            prime[i] = true; 
          
        for(int p = 2; p*p <=n; p++) 
        { 
            // If prime[p] is not changed, then it is a prime 
            if(prime[p] == true) 
            { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } 

        for(int i = 2; i <= n; i++) 
        { 
            if(prime[i] == true) 
                res.add(i);
        }
        return res;
    } boolean prime[] = new boolean[n+1]; prime new boolean[n+1] n+1 n 1 ArrayList<Integer> res = new ArrayList(); res new ArrayList() for(int i=0;i<n;i++) 
            prime[i] = true; int i=0; int i=0; i 0 i<n i n i++ i++ i prime[i] = true; prime[i] = true prime[i] prime i true for(int p = 2; p*p <=n; p++) 
        { 
            // If prime[p] is not changed, then it is a prime 
            if(prime[p] == true) 
            { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } int p = 2; int p = 2; p 2 p*p <=n p*p p p n p++ p++ p { 
            // If prime[p] is not changed, then it is a prime 
            if(prime[p] == true) 
            { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } { 
            // If prime[p] is not changed, then it is a prime 
            if(prime[p] == true) 
            { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } if(prime[p] == true) 
            { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } prime[p] == true prime[p] prime p true { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; int i = p*p; int i = p*p; i p*p p p i <= n i n i += p i += p i p prime[i] = false; prime[i] = false prime[i] prime i false for(int i = 2; i <= n; i++) 
        { 
            if(prime[i] == true) 
                res.add(i);
        } int i = 2; int i = 2; i 2 i <= n i n i++ i++ i { 
            if(prime[i] == true) 
                res.add(i);
        } { 
            if(prime[i] == true) 
                res.add(i);
        } if(prime[i] == true) 
                res.add(i); prime[i] == true prime[i] prime i true res.add(i) res.add res i return res; res int n n //returns index; outputs earliest occurence; -1 if target value does not exist
    static int getUpper(int[] arr, int target)  
    {  
        int start = 0, end = arr.length - 1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to right side if target is  
            // greater.  
            if (arr[mid] <= target) {  
                start = mid + 1;  
            }  
    
            // Move left side.  
            else {  
                ans = mid;  
                end = mid - 1;  
            }  
        }  
        return ans;  
    } getUpper {  
        int start = 0, end = arr.length - 1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to right side if target is  
            // greater.  
            if (arr[mid] <= target) {  
                start = mid + 1;  
            }  
    
            // Move left side.  
            else {  
                ans = mid;  
                end = mid - 1;  
            }  
        }  
        return ans;  
    } int start = 0 start 0 end = arr.length - 1; end arr.length - 1 arr.length arr arr.length 1 int ans = -1; ans -1 1 while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to right side if target is  
            // greater.  
            if (arr[mid] <= target) {  
                start = mid + 1;  
            }  
    
            // Move left side.  
            else {  
                ans = mid;  
                end = mid - 1;  
            }  
        } start <= end start end {  
            int mid = (start + end) / 2;  
    
            // Move to right side if target is  
            // greater.  
            if (arr[mid] <= target) {  
                start = mid + 1;  
            }  
    
            // Move left side.  
            else {  
                ans = mid;  
                end = mid - 1;  
            }  
        } int mid = (start + end) / 2; mid (start + end) / 2 (start + end) start end 2 if (arr[mid] <= target) {  
                start = mid + 1;  
            }  
    
            // Move left side.  
            else {  
                ans = mid;  
                end = mid - 1;  
            } arr[mid] <= target arr[mid] arr mid target {  
                start = mid + 1;  
            } start = mid + 1 start mid + 1 mid 1 {  
                ans = mid;  
                end = mid - 1;  
            } ans = mid ans mid end = mid - 1 end mid - 1 mid 1 return ans; ans int[] arr arr int target target //returns index; outputs latest occurence; -1 if target value does not exist
    static int getLower(int[] arr, int target)  
    {  
        int start = 0, end = arr.length-1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to the left side if the target is smaller  
            if (arr[mid] >= target) {  
                end = mid - 1;  
            }  
    
            // Move right side  
            else {  
                ans = mid;  
                start = mid + 1;  
            }  
        }  
        return ans;  
    } getLower {  
        int start = 0, end = arr.length-1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to the left side if the target is smaller  
            if (arr[mid] >= target) {  
                end = mid - 1;  
            }  
    
            // Move right side  
            else {  
                ans = mid;  
                start = mid + 1;  
            }  
        }  
        return ans;  
    } int start = 0 start 0 end = arr.length-1; end arr.length-1 arr.length arr arr.length 1 int ans = -1; ans -1 1 while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to the left side if the target is smaller  
            if (arr[mid] >= target) {  
                end = mid - 1;  
            }  
    
            // Move right side  
            else {  
                ans = mid;  
                start = mid + 1;  
            }  
        } start <= end start end {  
            int mid = (start + end) / 2;  
    
            // Move to the left side if the target is smaller  
            if (arr[mid] >= target) {  
                end = mid - 1;  
            }  
    
            // Move right side  
            else {  
                ans = mid;  
                start = mid + 1;  
            }  
        } int mid = (start + end) / 2; mid (start + end) / 2 (start + end) start end 2 if (arr[mid] >= target) {  
                end = mid - 1;  
            }  
    
            // Move right side  
            else {  
                ans = mid;  
                start = mid + 1;  
            } arr[mid] >= target arr[mid] arr mid target {  
                end = mid - 1;  
            } end = mid - 1 end mid - 1 mid 1 {  
                ans = mid;  
                start = mid + 1;  
            } ans = mid ans mid start = mid + 1 start mid + 1 mid 1 return ans; ans int[] arr arr int target target static String removeLastChar(String ss) {
        if (ss == null || ss.length() == 0) {
            return ss;
        }
        return ss.substring(0, ss.length()-1);
    } removeLastChar {
        if (ss == null || ss.length() == 0) {
            return ss;
        }
        return ss.substring(0, ss.length()-1);
    } if (ss == null || ss.length() == 0) {
            return ss;
        } ss == null || ss.length() == 0 ss == null ss null ss.length() == 0 ss.length() ss.length ss 0 {
            return ss;
        } return ss; ss return ss.substring(0, ss.length()-1); ss.substring(0, ss.length()-1) ss.substring ss 0 ss.length()-1 ss.length() ss.length ss 1 String ss ss static void solveLunLun(){
        FastScanner sc = new FastScanner();
        Queue<Long> q = new ArrayDeque();
        for(int i = 1; i <= 9; i++){
            q.add((long) i);
        }
        int k = sc.nextInt();
        int cnt = 0;
        long x = 1;
        while(cnt < k){
            x = q.poll();
            cnt++;
            if(cnt >= k) break;
            
            long d = x % (long) 10;
            if(d == 0){
                q.add( (10 * x));
                q.add( (10 * x) + d + 1 );
            }
            else if (d == 9){
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            }
            else {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            }
        }
        out.println(x);

    } solveLunLun {
        FastScanner sc = new FastScanner();
        Queue<Long> q = new ArrayDeque();
        for(int i = 1; i <= 9; i++){
            q.add((long) i);
        }
        int k = sc.nextInt();
        int cnt = 0;
        long x = 1;
        while(cnt < k){
            x = q.poll();
            cnt++;
            if(cnt >= k) break;
            
            long d = x % (long) 10;
            if(d == 0){
                q.add( (10 * x));
                q.add( (10 * x) + d + 1 );
            }
            else if (d == 9){
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            }
            else {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            }
        }
        out.println(x);

    } FastScanner sc = new FastScanner(); sc new FastScanner() Queue<Long> q = new ArrayDeque(); q new ArrayDeque() for(int i = 1; i <= 9; i++){
            q.add((long) i);
        } int i = 1; int i = 1; i 1 i <= 9 i 9 i++ i++ i {
            q.add((long) i);
        } {
            q.add((long) i);
        } q.add((long) i) q.add q (long) i int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc int cnt = 0; cnt 0 long x = 1; x 1 while(cnt < k){
            x = q.poll();
            cnt++;
            if(cnt >= k) break;
            
            long d = x % (long) 10;
            if(d == 0){
                q.add( (10 * x));
                q.add( (10 * x) + d + 1 );
            }
            else if (d == 9){
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            }
            else {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            }
        } cnt < k cnt k {
            x = q.poll();
            cnt++;
            if(cnt >= k) break;
            
            long d = x % (long) 10;
            if(d == 0){
                q.add( (10 * x));
                q.add( (10 * x) + d + 1 );
            }
            else if (d == 9){
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            }
            else {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            }
        } x = q.poll() x q.poll() q.poll q cnt++ cnt if(cnt >= k) break; cnt >= k cnt k break; long d = x % (long) 10; d x % (long) 10 x (long) 10 if(d == 0){
                q.add( (10 * x));
                q.add( (10 * x) + d + 1 );
            }
            else if (d == 9){
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            }
            else {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            } d == 0 d 0 {
                q.add( (10 * x));
                q.add( (10 * x) + d + 1 );
            } q.add( (10 * x)) q.add q (10 * x) 10 x q.add( (10 * x) + d + 1 ) q.add q (10 * x) + d + 1 (10 * x) + d + 1 (10 * x) 10 x d 1 if (d == 9){
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            }
            else {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            } d == 9 d 9 {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            } q.add( (10 * x) + d - 1) q.add q (10 * x) + d - 1 (10 * x) + d (10 * x) 10 x d 1 q.add( (10 * x) + d) q.add q (10 * x) + d (10 * x) 10 x d {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            } q.add( (10 * x) + d - 1) q.add q (10 * x) + d - 1 (10 * x) + d (10 * x) 10 x d 1 q.add( (10 * x) + d) q.add q (10 * x) + d (10 * x) 10 x d q.add( (10 * x) + d + 1 ) q.add q (10 * x) + d + 1 (10 * x) + d + 1 (10 * x) 10 x d 1 out.println(x) out.println out x private static int factorial(int n){
            int fac = 1;
            for(int i=2;i<=n;i++){
                    fac *= i;
            }
 
            return fac;
    } factorial {
            int fac = 1;
            for(int i=2;i<=n;i++){
                    fac *= i;
            }
 
            return fac;
    } int fac = 1; fac 1 for(int i=2;i<=n;i++){
                    fac *= i;
            } int i=2; int i=2; i 2 i<=n i n i++ i++ i {
                    fac *= i;
            } {
                    fac *= i;
            } fac *= i fac i return fac; fac int n n private static boolean isPrime(int n){
            if(n == 0 || n == 1){
                    return false;
            }else if(n%2 == 0){
                    return false;
            }else{
                    int x = (int)(Math.sqrt(n)) + 1;
                    for(int i=3;i<=x;i+=2){
                            if(n % i == 0){
                                    return false;
                            }
                    }
                    return true;
            }
    } isPrime {
            if(n == 0 || n == 1){
                    return false;
            }else if(n%2 == 0){
                    return false;
            }else{
                    int x = (int)(Math.sqrt(n)) + 1;
                    for(int i=3;i<=x;i+=2){
                            if(n % i == 0){
                                    return false;
                            }
                    }
                    return true;
            }
    } if(n == 0 || n == 1){
                    return false;
            }else if(n%2 == 0){
                    return false;
            }else{
                    int x = (int)(Math.sqrt(n)) + 1;
                    for(int i=3;i<=x;i+=2){
                            if(n % i == 0){
                                    return false;
                            }
                    }
                    return true;
            } n == 0 || n == 1 n == 0 n 0 n == 1 n 1 {
                    return false;
            } return false; false if(n%2 == 0){
                    return false;
            }else{
                    int x = (int)(Math.sqrt(n)) + 1;
                    for(int i=3;i<=x;i+=2){
                            if(n % i == 0){
                                    return false;
                            }
                    }
                    return true;
            } n%2 == 0 n%2 n 2 0 {
                    return false;
            } return false; false {
                    int x = (int)(Math.sqrt(n)) + 1;
                    for(int i=3;i<=x;i+=2){
                            if(n % i == 0){
                                    return false;
                            }
                    }
                    return true;
            } int x = (int)(Math.sqrt(n)) + 1; x (int)(Math.sqrt(n)) + 1 (int)(Math.sqrt(n)) Math.sqrt Math n 1 for(int i=3;i<=x;i+=2){
                            if(n % i == 0){
                                    return false;
                            }
                    } int i=3; int i=3; i 3 i<=x i x i+=2 i+=2 i 2 {
                            if(n % i == 0){
                                    return false;
                            }
                    } {
                            if(n % i == 0){
                                    return false;
                            }
                    } if(n % i == 0){
                                    return false;
                            } n % i == 0 n % i n i 0 {
                                    return false;
                            } return false; false return true; true int n n private static long pow(int base,int exp){
            if(exp == 0){
                    return 1;
            }else if(exp == 1){
                    return base;
            }else{
                    long a = pow(base,exp/2);
                    if(exp%2 == 0){
                            return a * a;
                    }else{
                            return a * a * base;
                    }
            }
 
    } pow {
            if(exp == 0){
                    return 1;
            }else if(exp == 1){
                    return base;
            }else{
                    long a = pow(base,exp/2);
                    if(exp%2 == 0){
                            return a * a;
                    }else{
                            return a * a * base;
                    }
            }
 
    } if(exp == 0){
                    return 1;
            }else if(exp == 1){
                    return base;
            }else{
                    long a = pow(base,exp/2);
                    if(exp%2 == 0){
                            return a * a;
                    }else{
                            return a * a * base;
                    }
            } exp == 0 exp 0 {
                    return 1;
            } return 1; 1 if(exp == 1){
                    return base;
            }else{
                    long a = pow(base,exp/2);
                    if(exp%2 == 0){
                            return a * a;
                    }else{
                            return a * a * base;
                    }
            } exp == 1 exp 1 {
                    return base;
            } return base; base {
                    long a = pow(base,exp/2);
                    if(exp%2 == 0){
                            return a * a;
                    }else{
                            return a * a * base;
                    }
            } long a = pow(base,exp/2); a pow(base,exp/2) pow base exp/2 exp 2 if(exp%2 == 0){
                            return a * a;
                    }else{
                            return a * a * base;
                    } exp%2 == 0 exp%2 exp 2 0 {
                            return a * a;
                    } return a * a; a * a a a {
                            return a * a * base;
                    } return a * a * base; a * a * base a * a * base a a base int base base int exp exp private static int gcd(int a,int b){
            if(a == 0){
                    return b;
            }
 
            return gcd(b%a,a);
    } gcd {
            if(a == 0){
                    return b;
            }
 
            return gcd(b%a,a);
    } if(a == 0){
                    return b;
            } a == 0 a 0 {
                    return b;
            } return b; b return gcd(b%a,a); gcd(b%a,a) gcd b%a b a a int a a int b b private static int lcm(int a,int b){
            return (a * b)/gcd(a,b);
    } lcm {
            return (a * b)/gcd(a,b);
    } return (a * b)/gcd(a,b); (a * b)/gcd(a,b) (a * b) a b gcd(a,b) gcd a b int a a int b b private static int BSearch(int target, int[] arr){
        int index = -1;
        int l = 0;
        int r = arr.length - 1;
        
        while(l <= r){
            int mid = (l + r) / 2;
            if(arr[mid] <= target){
                index = mid;
                l = mid + 1;
            } else{
                r = mid - 1;    
            }
        }
        
        return index;
    } BSearch {
        int index = -1;
        int l = 0;
        int r = arr.length - 1;
        
        while(l <= r){
            int mid = (l + r) / 2;
            if(arr[mid] <= target){
                index = mid;
                l = mid + 1;
            } else{
                r = mid - 1;    
            }
        }
        
        return index;
    } int index = -1; index -1 1 int l = 0; l 0 int r = arr.length - 1; r arr.length - 1 arr.length arr arr.length 1 while(l <= r){
            int mid = (l + r) / 2;
            if(arr[mid] <= target){
                index = mid;
                l = mid + 1;
            } else{
                r = mid - 1;    
            }
        } l <= r l r {
            int mid = (l + r) / 2;
            if(arr[mid] <= target){
                index = mid;
                l = mid + 1;
            } else{
                r = mid - 1;    
            }
        } int mid = (l + r) / 2; mid (l + r) / 2 (l + r) l r 2 if(arr[mid] <= target){
                index = mid;
                l = mid + 1;
            } else{
                r = mid - 1;    
            } arr[mid] <= target arr[mid] arr mid target {
                index = mid;
                l = mid + 1;
            } index = mid index mid l = mid + 1 l mid + 1 mid 1 {
                r = mid - 1;    
            } r = mid - 1 r mid - 1 mid 1 return index; index int target target int[] arr arr class FastScanner { 
    BufferedReader br; 
    StringTokenizer st; 

    public FastScanner() 
    { 
        br = new BufferedReader(new
                 InputStreamReader(System.in)); 
    } 

    String next() 
    { 
        while (st == null || !st.hasMoreElements()) 
        { 
            try
            { 
                st = new StringTokenizer(br.readLine()); 
            } 
            catch (IOException  e) 
            { 
                e.printStackTrace(); 
            } 
        } 
        return st.nextToken(); 
    } 

    int nextInt() 
    { 
        return Integer.parseInt(next()); 
    } 

    long nextLong() 
    { 
        return Long.parseLong(next()); 
    } 

    double nextDouble() 
    { 
        return Double.parseDouble(next()); 
    } 

    String nextLine() 
    { 
        String str = ""; 
        try
        { 
            str = br.readLine(); 
        } 
        catch (IOException e) 
        { 
            e.printStackTrace(); 
        } 
        return str; 
    } 

    int[] nextIntArray(int length) {
       int[] arr = new int[length];
       for (int i = 0; i < length; i++)
           arr[i] = nextInt();
       return arr;
   }
} FastScanner BufferedReader br; br StringTokenizer st; st public FastScanner() 
    { 
        br = new BufferedReader(new
                 InputStreamReader(System.in)); 
    } FastScanner { 
        br = new BufferedReader(new
                 InputStreamReader(System.in)); 
    } br = new BufferedReader(new
                 InputStreamReader(System.in)) br new BufferedReader(new
                 InputStreamReader(System.in)) String next() 
    { 
        while (st == null || !st.hasMoreElements()) 
        { 
            try
            { 
                st = new StringTokenizer(br.readLine()); 
            } 
            catch (IOException  e) 
            { 
                e.printStackTrace(); 
            } 
        } 
        return st.nextToken(); 
    } next { 
        while (st == null || !st.hasMoreElements()) 
        { 
            try
            { 
                st = new StringTokenizer(br.readLine()); 
            } 
            catch (IOException  e) 
            { 
                e.printStackTrace(); 
            } 
        } 
        return st.nextToken(); 
    } while (st == null || !st.hasMoreElements()) 
        { 
            try
            { 
                st = new StringTokenizer(br.readLine()); 
            } 
            catch (IOException  e) 
            { 
                e.printStackTrace(); 
            } 
        } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st { 
            try
            { 
                st = new StringTokenizer(br.readLine()); 
            } 
            catch (IOException  e) 
            { 
                e.printStackTrace(); 
            } 
        } try
            { 
                st = new StringTokenizer(br.readLine()); 
            } 
            catch (IOException  e) 
            { 
                e.printStackTrace(); 
            } catch (IOException  e) 
            { 
                e.printStackTrace(); 
            } IOException  e { 
                e.printStackTrace(); 
            } e.printStackTrace() e.printStackTrace e { 
                st = new StringTokenizer(br.readLine()); 
            } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() 
    { 
        return Integer.parseInt(next()); 
    } nextInt { 
        return Integer.parseInt(next()); 
    } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() 
    { 
        return Long.parseLong(next()); 
    } nextLong { 
        return Long.parseLong(next()); 
    } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() 
    { 
        return Double.parseDouble(next()); 
    } nextDouble { 
        return Double.parseDouble(next()); 
    } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() 
    { 
        String str = ""; 
        try
        { 
            str = br.readLine(); 
        } 
        catch (IOException e) 
        { 
            e.printStackTrace(); 
        } 
        return str; 
    } nextLine { 
        String str = ""; 
        try
        { 
            str = br.readLine(); 
        } 
        catch (IOException e) 
        { 
            e.printStackTrace(); 
        } 
        return str; 
    } String str = ""; str "" try
        { 
            str = br.readLine(); 
        } 
        catch (IOException e) 
        { 
            e.printStackTrace(); 
        } catch (IOException e) 
        { 
            e.printStackTrace(); 
        } IOException e { 
            e.printStackTrace(); 
        } e.printStackTrace() e.printStackTrace e { 
            str = br.readLine(); 
        } str = br.readLine() str br.readLine() br.readLine br return str; str int[] nextIntArray(int length) {
       int[] arr = new int[length];
       for (int i = 0; i < length; i++)
           arr[i] = nextInt();
       return arr;
   } nextIntArray {
       int[] arr = new int[length];
       for (int i = 0; i < length; i++)
           arr[i] = nextInt();
       return arr;
   } int[] arr = new int[length]; arr new int[length] length for (int i = 0; i < length; i++)
           arr[i] = nextInt(); int i = 0; int i = 0; i 0 i < length i length i++ i++ i arr[i] = nextInt(); arr[i] = nextInt() arr[i] arr i nextInt() nextInt return arr; arr int length length class Node
{
    public int V;
    public Node(int v)
    {
        this.V=v;
    }
} Node public int V; V public Node(int v)
    {
        this.V=v;
    } Node {
        this.V=v;
    } this.V=v this.V this this.V v int v v public class Main {
    public static PrintStream out = new PrintStream(System.out);
    static LinkedList<Integer> adj[];
    static boolean[] vis;
    static final int nINF = Integer.MIN_VALUE;
    static final int INF = Integer.MAX_VALUE;
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        boolean ok = true;
        int l = 0; int r = s.length() - 1;
        while(l < r){
            if(c[l] != c[r]){
                //out.println("A");
                ok = false;
                break;
            }
            l++; r--;
        }
        if(!ok) out.println("No");
        else {
            int n = c.length;
            l = 0; r = ((n - 1) / 2) - 1 ;
            while(l < r) {
                if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              }
              l++; r--;              
            }
            if(!ok) out.println("No");
            else {
            l = ((n + 3) / 2) - 1 ; r = n - 1;
                while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                }
                if(!ok) out.println("No");
                else out.println("Yes");
                
            }
        }
        

    }
    
    static void initAdj(int n){
        adj = new LinkedList[n + 2];
        for(int i = 0; i <= n + 1; i++)
            adj[i] = new LinkedList();
    }    
    
    static void dfs(int n){
        Iterator<Integer> i = adj[n].listIterator();
        while(i.hasNext()){
            Integer a = i.next();
            if(!vis[a]){
                vis[a] = true;
                dfs(a);
            }
        }
    }
    
    static ArrayList<Integer> sieve(int n){
        boolean prime[] = new boolean[n+1]; 
        ArrayList<Integer> res = new ArrayList();
        for(int i=0;i<n;i++) 
            prime[i] = true; 
          
        for(int p = 2; p*p <=n; p++) 
        { 
            // If prime[p] is not changed, then it is a prime 
            if(prime[p] == true) 
            { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } 

        for(int i = 2; i <= n; i++) 
        { 
            if(prime[i] == true) 
                res.add(i);
        }
        return res;
    }
    
    //returns index; outputs earliest occurence; -1 if target value does not exist
    static int getUpper(int[] arr, int target)  
    {  
        int start = 0, end = arr.length - 1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to right side if target is  
            // greater.  
            if (arr[mid] <= target) {  
                start = mid + 1;  
            }  
    
            // Move left side.  
            else {  
                ans = mid;  
                end = mid - 1;  
            }  
        }  
        return ans;  
    }  
    
    //returns index; outputs latest occurence; -1 if target value does not exist
    static int getLower(int[] arr, int target)  
    {  
        int start = 0, end = arr.length-1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to the left side if the target is smaller  
            if (arr[mid] >= target) {  
                end = mid - 1;  
            }  
    
            // Move right side  
            else {  
                ans = mid;  
                start = mid + 1;  
            }  
        }  
        return ans;  
    }  
     
   

    static String removeLastChar(String ss) {
        if (ss == null || ss.length() == 0) {
            return ss;
        }
        return ss.substring(0, ss.length()-1);
    }
    
    static void solveLunLun(){
        FastScanner sc = new FastScanner();
        Queue<Long> q = new ArrayDeque();
        for(int i = 1; i <= 9; i++){
            q.add((long) i);
        }
        int k = sc.nextInt();
        int cnt = 0;
        long x = 1;
        while(cnt < k){
            x = q.poll();
            cnt++;
            if(cnt >= k) break;
            
            long d = x % (long) 10;
            if(d == 0){
                q.add( (10 * x));
                q.add( (10 * x) + d + 1 );
            }
            else if (d == 9){
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            }
            else {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            }
        }
        out.println(x);

    }
    
    private static int factorial(int n){
            int fac = 1;
            for(int i=2;i<=n;i++){
                    fac *= i;
            }
 
            return fac;
    }
    
    private static boolean isPrime(int n){
            if(n == 0 || n == 1){
                    return false;
            }else if(n%2 == 0){
                    return false;
            }else{
                    int x = (int)(Math.sqrt(n)) + 1;
                    for(int i=3;i<=x;i+=2){
                            if(n % i == 0){
                                    return false;
                            }
                    }
                    return true;
            }
    }
 
    private static long pow(int base,int exp){
            if(exp == 0){
                    return 1;
            }else if(exp == 1){
                    return base;
            }else{
                    long a = pow(base,exp/2);
                    if(exp%2 == 0){
                            return a * a;
                    }else{
                            return a * a * base;
                    }
            }
 
    }
 
    private static int gcd(int a,int b){
            if(a == 0){
                    return b;
            }
 
            return gcd(b%a,a);
    }
 
    private static int lcm(int a,int b){
            return (a * b)/gcd(a,b);
    }
    
//    private static ArrayList<Integer> primeSieve(int n){
//        boolean b[] = new boolean[n+1];
//        b[0] = true;
//        b[1] = true;
//        for(int i=2;i<=5;i++){
//                int j = 2;
//                while(i * j <= n && !b[i]){
//                        b[i * j] = true;
//                        j++;
//                }
//        }
// 
//        ArrayList<Integer> arr = new ArrayList<>();
//        for(int i=2;i<n+1;i++){
//                if(!b[i]){
//                        arr.add(i);
//                }
//        }
// 
//        return arr;
//    }   
    
    private static int BSearch(int target, int[] arr){
        int index = -1;
        int l = 0;
        int r = arr.length - 1;
        
        while(l <= r){
            int mid = (l + r) / 2;
            if(arr[mid] <= target){
                index = mid;
                l = mid + 1;
            } else{
                r = mid - 1;    
            }
        }
        
        return index;
    }
        
 
} public class Main {
    public static PrintStream out = new PrintStream(System.out);
    static LinkedList<Integer> adj[];
    static boolean[] vis;
    static final int nINF = Integer.MIN_VALUE;
    static final int INF = Integer.MAX_VALUE;
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        boolean ok = true;
        int l = 0; int r = s.length() - 1;
        while(l < r){
            if(c[l] != c[r]){
                //out.println("A");
                ok = false;
                break;
            }
            l++; r--;
        }
        if(!ok) out.println("No");
        else {
            int n = c.length;
            l = 0; r = ((n - 1) / 2) - 1 ;
            while(l < r) {
                if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              }
              l++; r--;              
            }
            if(!ok) out.println("No");
            else {
            l = ((n + 3) / 2) - 1 ; r = n - 1;
                while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                }
                if(!ok) out.println("No");
                else out.println("Yes");
                
            }
        }
        

    }
    
    static void initAdj(int n){
        adj = new LinkedList[n + 2];
        for(int i = 0; i <= n + 1; i++)
            adj[i] = new LinkedList();
    }    
    
    static void dfs(int n){
        Iterator<Integer> i = adj[n].listIterator();
        while(i.hasNext()){
            Integer a = i.next();
            if(!vis[a]){
                vis[a] = true;
                dfs(a);
            }
        }
    }
    
    static ArrayList<Integer> sieve(int n){
        boolean prime[] = new boolean[n+1]; 
        ArrayList<Integer> res = new ArrayList();
        for(int i=0;i<n;i++) 
            prime[i] = true; 
          
        for(int p = 2; p*p <=n; p++) 
        { 
            // If prime[p] is not changed, then it is a prime 
            if(prime[p] == true) 
            { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } 

        for(int i = 2; i <= n; i++) 
        { 
            if(prime[i] == true) 
                res.add(i);
        }
        return res;
    }
    
    //returns index; outputs earliest occurence; -1 if target value does not exist
    static int getUpper(int[] arr, int target)  
    {  
        int start = 0, end = arr.length - 1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to right side if target is  
            // greater.  
            if (arr[mid] <= target) {  
                start = mid + 1;  
            }  
    
            // Move left side.  
            else {  
                ans = mid;  
                end = mid - 1;  
            }  
        }  
        return ans;  
    }  
    
    //returns index; outputs latest occurence; -1 if target value does not exist
    static int getLower(int[] arr, int target)  
    {  
        int start = 0, end = arr.length-1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to the left side if the target is smaller  
            if (arr[mid] >= target) {  
                end = mid - 1;  
            }  
    
            // Move right side  
            else {  
                ans = mid;  
                start = mid + 1;  
            }  
        }  
        return ans;  
    }  
     
   

    static String removeLastChar(String ss) {
        if (ss == null || ss.length() == 0) {
            return ss;
        }
        return ss.substring(0, ss.length()-1);
    }
    
    static void solveLunLun(){
        FastScanner sc = new FastScanner();
        Queue<Long> q = new ArrayDeque();
        for(int i = 1; i <= 9; i++){
            q.add((long) i);
        }
        int k = sc.nextInt();
        int cnt = 0;
        long x = 1;
        while(cnt < k){
            x = q.poll();
            cnt++;
            if(cnt >= k) break;
            
            long d = x % (long) 10;
            if(d == 0){
                q.add( (10 * x));
                q.add( (10 * x) + d + 1 );
            }
            else if (d == 9){
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            }
            else {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            }
        }
        out.println(x);

    }
    
    private static int factorial(int n){
            int fac = 1;
            for(int i=2;i<=n;i++){
                    fac *= i;
            }
 
            return fac;
    }
    
    private static boolean isPrime(int n){
            if(n == 0 || n == 1){
                    return false;
            }else if(n%2 == 0){
                    return false;
            }else{
                    int x = (int)(Math.sqrt(n)) + 1;
                    for(int i=3;i<=x;i+=2){
                            if(n % i == 0){
                                    return false;
                            }
                    }
                    return true;
            }
    }
 
    private static long pow(int base,int exp){
            if(exp == 0){
                    return 1;
            }else if(exp == 1){
                    return base;
            }else{
                    long a = pow(base,exp/2);
                    if(exp%2 == 0){
                            return a * a;
                    }else{
                            return a * a * base;
                    }
            }
 
    }
 
    private static int gcd(int a,int b){
            if(a == 0){
                    return b;
            }
 
            return gcd(b%a,a);
    }
 
    private static int lcm(int a,int b){
            return (a * b)/gcd(a,b);
    }
    
//    private static ArrayList<Integer> primeSieve(int n){
//        boolean b[] = new boolean[n+1];
//        b[0] = true;
//        b[1] = true;
//        for(int i=2;i<=5;i++){
//                int j = 2;
//                while(i * j <= n && !b[i]){
//                        b[i * j] = true;
//                        j++;
//                }
//        }
// 
//        ArrayList<Integer> arr = new ArrayList<>();
//        for(int i=2;i<n+1;i++){
//                if(!b[i]){
//                        arr.add(i);
//                }
//        }
// 
//        return arr;
//    }   
    
    private static int BSearch(int target, int[] arr){
        int index = -1;
        int l = 0;
        int r = arr.length - 1;
        
        while(l <= r){
            int mid = (l + r) / 2;
            if(arr[mid] <= target){
                index = mid;
                l = mid + 1;
            } else{
                r = mid - 1;    
            }
        }
        
        return index;
    }
        
 
} Main
import java.util.*;
import java.io.*;

//294784RY

public class Main {
    public static PrintStream out = new PrintStream(System.out);
    static LinkedList<Integer> adj[];
    static boolean[] vis;
    static final int nINF = Integer.MIN_VALUE;
    static final int INF = Integer.MAX_VALUE;
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        String s = sc.nextLine();
        char[] c = s.toCharArray();
        boolean ok = true;
        int l = 0; int r = s.length() - 1;
        while(l < r){
            if(c[l] != c[r]){
                //out.println("A");
                ok = false;
                break;
            }
            l++; r--;
        }
        if(!ok) out.println("No");
        else {
            int n = c.length;
            l = 0; r = ((n - 1) / 2) - 1 ;
            while(l < r) {
                if(c[l] != c[r]){
                  //out.println("B: " + c[l] + " " + c[r]);
                  ok = false;
                  break;
              }
              l++; r--;              
            }
            if(!ok) out.println("No");
            else {
            l = ((n + 3) / 2) - 1 ; r = n - 1;
                while(l < r) {
                    if(c[l] != c[r]){
                     // out.println("C");
                      ok = false;
                      break;
                  }
                  l++; r--;              
                }
                if(!ok) out.println("No");
                else out.println("Yes");
                
            }
        }
        

    }
    
    static void initAdj(int n){
        adj = new LinkedList[n + 2];
        for(int i = 0; i <= n + 1; i++)
            adj[i] = new LinkedList();
    }    
    
    static void dfs(int n){
        Iterator<Integer> i = adj[n].listIterator();
        while(i.hasNext()){
            Integer a = i.next();
            if(!vis[a]){
                vis[a] = true;
                dfs(a);
            }
        }
    }
    
    static ArrayList<Integer> sieve(int n){
        boolean prime[] = new boolean[n+1]; 
        ArrayList<Integer> res = new ArrayList();
        for(int i=0;i<n;i++) 
            prime[i] = true; 
          
        for(int p = 2; p*p <=n; p++) 
        { 
            // If prime[p] is not changed, then it is a prime 
            if(prime[p] == true) 
            { 
                // Update all multiples of p 
                for(int i = p*p; i <= n; i += p) 
                    prime[i] = false; 
            } 
        } 

        for(int i = 2; i <= n; i++) 
        { 
            if(prime[i] == true) 
                res.add(i);
        }
        return res;
    }
    
    //returns index; outputs earliest occurence; -1 if target value does not exist
    static int getUpper(int[] arr, int target)  
    {  
        int start = 0, end = arr.length - 1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to right side if target is  
            // greater.  
            if (arr[mid] <= target) {  
                start = mid + 1;  
            }  
    
            // Move left side.  
            else {  
                ans = mid;  
                end = mid - 1;  
            }  
        }  
        return ans;  
    }  
    
    //returns index; outputs latest occurence; -1 if target value does not exist
    static int getLower(int[] arr, int target)  
    {  
        int start = 0, end = arr.length-1;  
    
        int ans = -1;  
        while (start <= end) {  
            int mid = (start + end) / 2;  
    
            // Move to the left side if the target is smaller  
            if (arr[mid] >= target) {  
                end = mid - 1;  
            }  
    
            // Move right side  
            else {  
                ans = mid;  
                start = mid + 1;  
            }  
        }  
        return ans;  
    }  
     
   

    static String removeLastChar(String ss) {
        if (ss == null || ss.length() == 0) {
            return ss;
        }
        return ss.substring(0, ss.length()-1);
    }
    
    static void solveLunLun(){
        FastScanner sc = new FastScanner();
        Queue<Long> q = new ArrayDeque();
        for(int i = 1; i <= 9; i++){
            q.add((long) i);
        }
        int k = sc.nextInt();
        int cnt = 0;
        long x = 1;
        while(cnt < k){
            x = q.poll();
            cnt++;
            if(cnt >= k) break;
            
            long d = x % (long) 10;
            if(d == 0){
                q.add( (10 * x));
                q.add( (10 * x) + d + 1 );
            }
            else if (d == 9){
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
            }
            else {
                q.add( (10 * x) + d - 1);
                q.add( (10 * x) + d);
                q.add( (10 * x) + d + 1 );                
            }
        }
        out.println(x);

    }
    
    private static int factorial(int n){
            int fac = 1;
            for(int i=2;i<=n;i++){
                    fac *= i;
            }
 
            return fac;
    }
    
    private static boolean isPrime(int n){
            if(n == 0 || n == 1){
                    return false;
            }else if(n%2 == 0){
                    return false;
            }else{
                    int x = (int)(Math.sqrt(n)) + 1;
                    for(int i=3;i<=x;i+=2){
                            if(n % i == 0){
                                    return false;
                            }
                    }
                    return true;
            }
    }
 
    private static long pow(int base,int exp){
            if(exp == 0){
                    return 1;
            }else if(exp == 1){
                    return base;
            }else{
                    long a = pow(base,exp/2);
                    if(exp%2 == 0){
                            return a * a;
                    }else{
                            return a * a * base;
                    }
            }
 
    }
 
    private static int gcd(int a,int b){
            if(a == 0){
                    return b;
            }
 
            return gcd(b%a,a);
    }
 
    private static int lcm(int a,int b){
            return (a * b)/gcd(a,b);
    }
    
//    private static ArrayList<Integer> primeSieve(int n){
//        boolean b[] = new boolean[n+1];
//        b[0] = true;
//        b[1] = true;
//        for(int i=2;i<=5;i++){
//                int j = 2;
//                while(i * j <= n && !b[i]){
//                        b[i * j] = true;
//                        j++;
//                }
//        }
// 
//        ArrayList<Integer> arr = new ArrayList<>();
//        for(int i=2;i<n+1;i++){
//                if(!b[i]){
//                        arr.add(i);
//                }
//        }
// 
//        return arr;
//    }   
    
    private static int BSearch(int target, int[] arr){
        int index = -1;
        int l = 0;
        int r = arr.length - 1;
        
        while(l <= r){
            int mid = (l + r) / 2;
            if(arr[mid] <= target){
                index = mid;
                l = mid + 1;
            } else{
                r = mid - 1;    
            }
        }
        
        return index;
    }
        
 
}


class FastScanner { 
    BufferedReader br; 
    StringTokenizer st; 

    public FastScanner() 
    { 
        br = new BufferedReader(new
                 InputStreamReader(System.in)); 
    } 

    String next() 
    { 
        while (st == null || !st.hasMoreElements()) 
        { 
            try
            { 
                st = new StringTokenizer(br.readLine()); 
            } 
            catch (IOException  e) 
            { 
                e.printStackTrace(); 
            } 
        } 
        return st.nextToken(); 
    } 

    int nextInt() 
    { 
        return Integer.parseInt(next()); 
    } 

    long nextLong() 
    { 
        return Long.parseLong(next()); 
    } 

    double nextDouble() 
    { 
        return Double.parseDouble(next()); 
    } 

    String nextLine() 
    { 
        String str = ""; 
        try
        { 
            str = br.readLine(); 
        } 
        catch (IOException e) 
        { 
            e.printStackTrace(); 
        } 
        return str; 
    } 

    int[] nextIntArray(int length) {
       int[] arr = new int[length];
       for (int i = 0; i < length; i++)
           arr[i] = nextInt();
       return arr;
   }
} 

class Node
{
    public int V;
    public Node(int v)
    {
        this.V=v;
    }
}



