import java.util.*;
import java.io.*;
public class Main {
    public static void main(String[] args) throws IOException{
    	// Solution sol = new Solution();
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	String s = br.readLine();
    	int N = s.length();
    	if(N%2==0)
    		System.out.println("No");
    	else if(checkPal(s)&&checkPal(s.substring(0,(N-1)/2))&&checkPal(s.substring((N+3)/2-1,N)))
    		System.out.println("Yes");
    	else
    		System.out.println("No");

    }

    public static boolean checkPal(String s){

    	for(int i=0; i<=s.length()/2; i++){
    		if(s.charAt(i)!=s.charAt(s.length()-1-i))
    			return false;
    	}
    	return true;
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws IOException{
    	// Solution sol = new Solution();
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	String s = br.readLine();
    	int N = s.length();
    	if(N%2==0)
    		System.out.println("No");
    	else if(checkPal(s)&&checkPal(s.substring(0,(N-1)/2))&&checkPal(s.substring((N+3)/2-1,N)))
    		System.out.println("Yes");
    	else
    		System.out.println("No");

    }

    public static boolean checkPal(String s){

    	for(int i=0; i<=s.length()/2; i++){
    		if(s.charAt(i)!=s.charAt(s.length()-1-i))
    			return false;
    	}
    	return true;
    }
} Main public static void main(String[] args) throws IOException{
    	// Solution sol = new Solution();
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	String s = br.readLine();
    	int N = s.length();
    	if(N%2==0)
    		System.out.println("No");
    	else if(checkPal(s)&&checkPal(s.substring(0,(N-1)/2))&&checkPal(s.substring((N+3)/2-1,N)))
    		System.out.println("Yes");
    	else
    		System.out.println("No");

    } main {
    	// Solution sol = new Solution();
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	String s = br.readLine();
    	int N = s.length();
    	if(N%2==0)
    		System.out.println("No");
    	else if(checkPal(s)&&checkPal(s.substring(0,(N-1)/2))&&checkPal(s.substring((N+3)/2-1,N)))
    		System.out.println("Yes");
    	else
    		System.out.println("No");

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String s = br.readLine(); s br.readLine() br.readLine br int N = s.length(); N s.length() s.length s if(N%2==0)
    		System.out.println("No");
    	else if(checkPal(s)&&checkPal(s.substring(0,(N-1)/2))&&checkPal(s.substring((N+3)/2-1,N)))
    		System.out.println("Yes");
    	else
    		System.out.println("No"); N%2==0 N%2 N 2 0 System.out.println("No") System.out.println System.out System System.out "No" if(checkPal(s)&&checkPal(s.substring(0,(N-1)/2))&&checkPal(s.substring((N+3)/2-1,N)))
    		System.out.println("Yes");
    	else
    		System.out.println("No"); checkPal(s)&&checkPal(s.substring(0,(N-1)/2))&&checkPal(s.substring((N+3)/2-1,N)) checkPal(s)&&checkPal(s.substring(0,(N-1)/2))&&checkPal(s.substring((N+3)/2-1,N)) checkPal(s) checkPal s checkPal(s.substring(0,(N-1)/2)) checkPal s.substring(0,(N-1)/2) s.substring s 0 (N-1)/2 (N-1) N 1 2 checkPal(s.substring((N+3)/2-1,N)) checkPal s.substring((N+3)/2-1,N) s.substring s (N+3)/2-1 (N+3)/2 (N+3) N 3 2 1 N System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args public static boolean checkPal(String s){

    	for(int i=0; i<=s.length()/2; i++){
    		if(s.charAt(i)!=s.charAt(s.length()-1-i))
    			return false;
    	}
    	return true;
    } checkPal {

    	for(int i=0; i<=s.length()/2; i++){
    		if(s.charAt(i)!=s.charAt(s.length()-1-i))
    			return false;
    	}
    	return true;
    } for(int i=0; i<=s.length()/2; i++){
    		if(s.charAt(i)!=s.charAt(s.length()-1-i))
    			return false;
    	} int i=0; int i=0; i 0 i<=s.length()/2 i s.length()/2 s.length() s.length s 2 i++ i++ i {
    		if(s.charAt(i)!=s.charAt(s.length()-1-i))
    			return false;
    	} {
    		if(s.charAt(i)!=s.charAt(s.length()-1-i))
    			return false;
    	} if(s.charAt(i)!=s.charAt(s.length()-1-i))
    			return false; s.charAt(i)!=s.charAt(s.length()-1-i) s.charAt(i) s.charAt s i s.charAt(s.length()-1-i) s.charAt s s.length()-1-i s.length()-1-i s.length() s.length s 1 i return false; false return true; true String s s public class Main {
    public static void main(String[] args) throws IOException{
    	// Solution sol = new Solution();
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	String s = br.readLine();
    	int N = s.length();
    	if(N%2==0)
    		System.out.println("No");
    	else if(checkPal(s)&&checkPal(s.substring(0,(N-1)/2))&&checkPal(s.substring((N+3)/2-1,N)))
    		System.out.println("Yes");
    	else
    		System.out.println("No");

    }

    public static boolean checkPal(String s){

    	for(int i=0; i<=s.length()/2; i++){
    		if(s.charAt(i)!=s.charAt(s.length()-1-i))
    			return false;
    	}
    	return true;
    }
} public class Main {
    public static void main(String[] args) throws IOException{
    	// Solution sol = new Solution();
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	String s = br.readLine();
    	int N = s.length();
    	if(N%2==0)
    		System.out.println("No");
    	else if(checkPal(s)&&checkPal(s.substring(0,(N-1)/2))&&checkPal(s.substring((N+3)/2-1,N)))
    		System.out.println("Yes");
    	else
    		System.out.println("No");

    }

    public static boolean checkPal(String s){

    	for(int i=0; i<=s.length()/2; i++){
    		if(s.charAt(i)!=s.charAt(s.length()-1-i))
    			return false;
    	}
    	return true;
    }
} Main
import java.util.*;
import java.io.*;
public class Main {
    public static void main(String[] args) throws IOException{
    	// Solution sol = new Solution();
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	String s = br.readLine();
    	int N = s.length();
    	if(N%2==0)
    		System.out.println("No");
    	else if(checkPal(s)&&checkPal(s.substring(0,(N-1)/2))&&checkPal(s.substring((N+3)/2-1,N)))
    		System.out.println("Yes");
    	else
    		System.out.println("No");

    }

    public static boolean checkPal(String s){

    	for(int i=0; i<=s.length()/2; i++){
    		if(s.charAt(i)!=s.charAt(s.length()-1-i))
    			return false;
    	}
    	return true;
    }
}