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

public class Main {	
	public static void main(String[] args) {
		FastScanner fs = new FastScanner();
		String S = fs.next();
		int N = S.length();

		if(isPalindrome(S)) {
        } else {
			System.out.println("No");
			return;
        }
    

		for(int i=0; i<(N-1)/4; i++){
			if(i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}
		for(int i=0; i<(N-1)/4; i++){
			if((N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}

		
		System.out.println("Yes");

		
		

	}
	
	public static boolean isPalindrome(String sentence) {
        int minIdx = 0;
        int maxIdx = sentence.length() - 1;
 
        while(minIdx < maxIdx) {
            if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
                return false;
            }
        }
        return true;
    }

	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");

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

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

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

		public int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		}

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

	}
	
} import java.util.*; util.* java import java.io.*; io.* java public class Main {	
	public static void main(String[] args) {
		FastScanner fs = new FastScanner();
		String S = fs.next();
		int N = S.length();

		if(isPalindrome(S)) {
        } else {
			System.out.println("No");
			return;
        }
    

		for(int i=0; i<(N-1)/4; i++){
			if(i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}
		for(int i=0; i<(N-1)/4; i++){
			if((N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}

		
		System.out.println("Yes");

		
		

	}
	
	public static boolean isPalindrome(String sentence) {
        int minIdx = 0;
        int maxIdx = sentence.length() - 1;
 
        while(minIdx < maxIdx) {
            if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
                return false;
            }
        }
        return true;
    }

	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");

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

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

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

		public int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		}

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

	}
	
} Main public static void main(String[] args) {
		FastScanner fs = new FastScanner();
		String S = fs.next();
		int N = S.length();

		if(isPalindrome(S)) {
        } else {
			System.out.println("No");
			return;
        }
    

		for(int i=0; i<(N-1)/4; i++){
			if(i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}
		for(int i=0; i<(N-1)/4; i++){
			if((N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}

		
		System.out.println("Yes");

		
		

	} main {
		FastScanner fs = new FastScanner();
		String S = fs.next();
		int N = S.length();

		if(isPalindrome(S)) {
        } else {
			System.out.println("No");
			return;
        }
    

		for(int i=0; i<(N-1)/4; i++){
			if(i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}
		for(int i=0; i<(N-1)/4; i++){
			if((N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}

		
		System.out.println("Yes");

		
		

	} FastScanner fs = new FastScanner(); fs new FastScanner() String S = fs.next(); S fs.next() fs.next fs int N = S.length(); N S.length() S.length S if(isPalindrome(S)) {
        } else {
			System.out.println("No");
			return;
        } isPalindrome(S) isPalindrome S {
        } {
			System.out.println("No");
			return;
        } System.out.println("No") System.out.println System.out System System.out "No" return; for(int i=0; i<(N-1)/4; i++){
			if(i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		} int i=0; int i=0; i 0 i<(N-1)/4 i (N-1)/4 (N-1) N 1 4 i++ i++ i {
			if(i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		} {
			if(i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		} if(i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			} i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i) i<=(N-1)/2-1-i i (N-1)/2-1-i (N-1)/2-1-i (N-1)/2 (N-1) N 1 2 1 i S.charAt(i)==S.charAt((N-1)/2-1-i) S.charAt(i) S.charAt S i S.charAt((N-1)/2-1-i) S.charAt S (N-1)/2-1-i (N-1)/2-1-i (N-1)/2 (N-1) N 1 2 1 i {
			continue;
			} continue; {
			System.out.println("No");
			return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; for(int i=0; i<(N-1)/4; i++){
			if((N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		} int i=0; int i=0; i 0 i<(N-1)/4 i (N-1)/4 (N-1) N 1 4 i++ i++ i {
			if((N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		} {
			if((N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		} if((N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			} (N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i) (N+3)/2-1-i<=N-1-i (N+3)/2-1-i (N+3)/2-1-i (N+3)/2 (N+3) N 3 2 1 i N-1-i N-1-i N 1 i S.charAt((N+3)/2-1+i)==S.charAt(N-1-i) S.charAt((N+3)/2-1+i) S.charAt S (N+3)/2-1+i (N+3)/2-1 (N+3)/2 (N+3) N 3 2 1 i S.charAt(N-1-i) S.charAt S N-1-i N-1-i N 1 i {
			continue;
			} continue; {
			System.out.println("No");
			return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public static boolean isPalindrome(String sentence) {
        int minIdx = 0;
        int maxIdx = sentence.length() - 1;
 
        while(minIdx < maxIdx) {
            if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
                return false;
            }
        }
        return true;
    } isPalindrome {
        int minIdx = 0;
        int maxIdx = sentence.length() - 1;
 
        while(minIdx < maxIdx) {
            if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
                return false;
            }
        }
        return true;
    } int minIdx = 0; minIdx 0 int maxIdx = sentence.length() - 1; maxIdx sentence.length() - 1 sentence.length() sentence.length sentence 1 while(minIdx < maxIdx) {
            if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
                return false;
            }
        } minIdx < maxIdx minIdx maxIdx {
            if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
                return false;
            }
        } if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
                return false;
            } sentence.charAt(minIdx++) != sentence.charAt(maxIdx--) sentence.charAt(minIdx++) sentence.charAt sentence minIdx++ minIdx sentence.charAt(maxIdx--) sentence.charAt sentence maxIdx-- maxIdx {
                return false;
            } return false; false return true; true String sentence sentence static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");

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

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

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

		public int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		}

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

	} FastScanner BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st=new StringTokenizer(""); st new StringTokenizer("") public String next() {
			while (!st.hasMoreElements())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		} next {
			while (!st.hasMoreElements())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		} while (!st.hasMoreElements())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				} !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st 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 public int nextInt() {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		} readArray {
			int[] a=new int[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		} int[] a=new int[n]; a new int[n] n for (int i=0; i<n; i++) {
				a[i]=nextInt();
			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
				a[i]=nextInt();
			} {
				a[i]=nextInt();
			} a[i]=nextInt() a[i] a i nextInt() nextInt return a; a int n n public double nextDouble() {
			return Double.parseDouble(next());
		} nextDouble {
			return Double.parseDouble(next());
		} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public class Main {	
	public static void main(String[] args) {
		FastScanner fs = new FastScanner();
		String S = fs.next();
		int N = S.length();

		if(isPalindrome(S)) {
        } else {
			System.out.println("No");
			return;
        }
    

		for(int i=0; i<(N-1)/4; i++){
			if(i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}
		for(int i=0; i<(N-1)/4; i++){
			if((N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}

		
		System.out.println("Yes");

		
		

	}
	
	public static boolean isPalindrome(String sentence) {
        int minIdx = 0;
        int maxIdx = sentence.length() - 1;
 
        while(minIdx < maxIdx) {
            if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
                return false;
            }
        }
        return true;
    }

	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");

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

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

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

		public int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		}

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

	}
	
} public class Main {	
	public static void main(String[] args) {
		FastScanner fs = new FastScanner();
		String S = fs.next();
		int N = S.length();

		if(isPalindrome(S)) {
        } else {
			System.out.println("No");
			return;
        }
    

		for(int i=0; i<(N-1)/4; i++){
			if(i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}
		for(int i=0; i<(N-1)/4; i++){
			if((N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}

		
		System.out.println("Yes");

		
		

	}
	
	public static boolean isPalindrome(String sentence) {
        int minIdx = 0;
        int maxIdx = sentence.length() - 1;
 
        while(minIdx < maxIdx) {
            if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
                return false;
            }
        }
        return true;
    }

	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");

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

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

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

		public int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		}

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

	}
	
} Main
import java.util.*;
import java.io.*;

public class Main {	
	public static void main(String[] args) {
		FastScanner fs = new FastScanner();
		String S = fs.next();
		int N = S.length();

		if(isPalindrome(S)) {
        } else {
			System.out.println("No");
			return;
        }
    

		for(int i=0; i<(N-1)/4; i++){
			if(i<=(N-1)/2-1-i&&S.charAt(i)==S.charAt((N-1)/2-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}
		for(int i=0; i<(N-1)/4; i++){
			if((N+3)/2-1-i<=N-1-i&&S.charAt((N+3)/2-1+i)==S.charAt(N-1-i)){
			continue;
			}else{
			System.out.println("No");
			return;
			}

		}

		
		System.out.println("Yes");

		
		

	}
	
	public static boolean isPalindrome(String sentence) {
        int minIdx = 0;
        int maxIdx = sentence.length() - 1;
 
        while(minIdx < maxIdx) {
            if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
                return false;
            }
        }
        return true;
    }

	
	static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");

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

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

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

		public int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		}

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

	}
	
}
