import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[][] array = new int[3][3];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_reverse=new ArrayList<String>(Arrays.asList(s.split("")));
		Collections.reverse(list_reverse);
		int a = (list.size()-1)/2;
		if(list.equals(list_reverse)) {
			List<String> list_mae=new ArrayList<String>();
			List<String> list_mae_re=new ArrayList<String>();
			for(int i=0;a>i;i++) {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			}
			Collections.reverse(list_mae_re);
			if(list_mae.equals(list_mae_re)) {
				List<String> list_ato=new ArrayList<String>();
				List<String> list_ato_re=new ArrayList<String>();
				for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				}
				Collections.reverse(list_ato_re);
				if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				}

			}
			else {
				System.out.println("No");
			}

		}
		else {
			System.out.println("No");
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[][] array = new int[3][3];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_reverse=new ArrayList<String>(Arrays.asList(s.split("")));
		Collections.reverse(list_reverse);
		int a = (list.size()-1)/2;
		if(list.equals(list_reverse)) {
			List<String> list_mae=new ArrayList<String>();
			List<String> list_mae_re=new ArrayList<String>();
			for(int i=0;a>i;i++) {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			}
			Collections.reverse(list_mae_re);
			if(list_mae.equals(list_mae_re)) {
				List<String> list_ato=new ArrayList<String>();
				List<String> list_ato_re=new ArrayList<String>();
				for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				}
				Collections.reverse(list_ato_re);
				if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				}

			}
			else {
				System.out.println("No");
			}

		}
		else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[][] array = new int[3][3];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_reverse=new ArrayList<String>(Arrays.asList(s.split("")));
		Collections.reverse(list_reverse);
		int a = (list.size()-1)/2;
		if(list.equals(list_reverse)) {
			List<String> list_mae=new ArrayList<String>();
			List<String> list_mae_re=new ArrayList<String>();
			for(int i=0;a>i;i++) {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			}
			Collections.reverse(list_mae_re);
			if(list_mae.equals(list_mae_re)) {
				List<String> list_ato=new ArrayList<String>();
				List<String> list_ato_re=new ArrayList<String>();
				for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				}
				Collections.reverse(list_ato_re);
				if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				}

			}
			else {
				System.out.println("No");
			}

		}
		else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[][] array = new int[3][3];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_reverse=new ArrayList<String>(Arrays.asList(s.split("")));
		Collections.reverse(list_reverse);
		int a = (list.size()-1)/2;
		if(list.equals(list_reverse)) {
			List<String> list_mae=new ArrayList<String>();
			List<String> list_mae_re=new ArrayList<String>();
			for(int i=0;a>i;i++) {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			}
			Collections.reverse(list_mae_re);
			if(list_mae.equals(list_mae_re)) {
				List<String> list_ato=new ArrayList<String>();
				List<String> list_ato_re=new ArrayList<String>();
				for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				}
				Collections.reverse(list_ato_re);
				if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				}

			}
			else {
				System.out.println("No");
			}

		}
		else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc List<String> list=new ArrayList<String>(Arrays.asList(s.split(""))); list new ArrayList<String>(Arrays.asList(s.split(""))) List<String> list_reverse=new ArrayList<String>(Arrays.asList(s.split(""))); list_reverse new ArrayList<String>(Arrays.asList(s.split(""))) Collections.reverse(list_reverse) Collections.reverse Collections list_reverse int a = (list.size()-1)/2; a (list.size()-1)/2 (list.size()-1) list.size() list.size list 1 2 if(list.equals(list_reverse)) {
			List<String> list_mae=new ArrayList<String>();
			List<String> list_mae_re=new ArrayList<String>();
			for(int i=0;a>i;i++) {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			}
			Collections.reverse(list_mae_re);
			if(list_mae.equals(list_mae_re)) {
				List<String> list_ato=new ArrayList<String>();
				List<String> list_ato_re=new ArrayList<String>();
				for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				}
				Collections.reverse(list_ato_re);
				if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				}

			}
			else {
				System.out.println("No");
			}

		}
		else {
			System.out.println("No");
		} list.equals(list_reverse) list.equals list list_reverse {
			List<String> list_mae=new ArrayList<String>();
			List<String> list_mae_re=new ArrayList<String>();
			for(int i=0;a>i;i++) {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			}
			Collections.reverse(list_mae_re);
			if(list_mae.equals(list_mae_re)) {
				List<String> list_ato=new ArrayList<String>();
				List<String> list_ato_re=new ArrayList<String>();
				for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				}
				Collections.reverse(list_ato_re);
				if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				}

			}
			else {
				System.out.println("No");
			}

		} List<String> list_mae=new ArrayList<String>(); list_mae new ArrayList<String>() List<String> list_mae_re=new ArrayList<String>(); list_mae_re new ArrayList<String>() for(int i=0;a>i;i++) {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			} int i=0; int i=0; i 0 a>i a i i++ i++ i {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			} {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			} list_mae.add(list.get(i)) list_mae.add list_mae list.get(i) list.get list i list_mae_re.add(list.get(i)) list_mae_re.add list_mae_re list.get(i) list.get list i Collections.reverse(list_mae_re) Collections.reverse Collections list_mae_re if(list_mae.equals(list_mae_re)) {
				List<String> list_ato=new ArrayList<String>();
				List<String> list_ato_re=new ArrayList<String>();
				for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				}
				Collections.reverse(list_ato_re);
				if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				}

			}
			else {
				System.out.println("No");
			} list_mae.equals(list_mae_re) list_mae.equals list_mae list_mae_re {
				List<String> list_ato=new ArrayList<String>();
				List<String> list_ato_re=new ArrayList<String>();
				for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				}
				Collections.reverse(list_ato_re);
				if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				}

			} List<String> list_ato=new ArrayList<String>(); list_ato new ArrayList<String>() List<String> list_ato_re=new ArrayList<String>(); list_ato_re new ArrayList<String>() for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				} int j=0; int j=0; j 0 a>j a j j++ j++ j {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				} {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				} list_ato.add(list_reverse.get(j)) list_ato.add list_ato list_reverse.get(j) list_reverse.get list_reverse j list_ato_re.add(list_reverse.get(j)) list_ato_re.add list_ato_re list_reverse.get(j) list_reverse.get list_reverse j Collections.reverse(list_ato_re) Collections.reverse Collections list_ato_re if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				} list_ato.equals(list_ato_re) list_ato.equals list_ato list_ato_re {
					System.out.println("Yes");
				} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
					System.out.println("No");
				} System.out.println("No") System.out.println System.out System System.out "No" {
				System.out.println("No");
			} System.out.println("No") System.out.println System.out System System.out "No" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[][] array = new int[3][3];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_reverse=new ArrayList<String>(Arrays.asList(s.split("")));
		Collections.reverse(list_reverse);
		int a = (list.size()-1)/2;
		if(list.equals(list_reverse)) {
			List<String> list_mae=new ArrayList<String>();
			List<String> list_mae_re=new ArrayList<String>();
			for(int i=0;a>i;i++) {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			}
			Collections.reverse(list_mae_re);
			if(list_mae.equals(list_mae_re)) {
				List<String> list_ato=new ArrayList<String>();
				List<String> list_ato_re=new ArrayList<String>();
				for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				}
				Collections.reverse(list_ato_re);
				if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				}

			}
			else {
				System.out.println("No");
			}

		}
		else {
			System.out.println("No");
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[][] array = new int[3][3];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_reverse=new ArrayList<String>(Arrays.asList(s.split("")));
		Collections.reverse(list_reverse);
		int a = (list.size()-1)/2;
		if(list.equals(list_reverse)) {
			List<String> list_mae=new ArrayList<String>();
			List<String> list_mae_re=new ArrayList<String>();
			for(int i=0;a>i;i++) {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			}
			Collections.reverse(list_mae_re);
			if(list_mae.equals(list_mae_re)) {
				List<String> list_ato=new ArrayList<String>();
				List<String> list_ato_re=new ArrayList<String>();
				for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				}
				Collections.reverse(list_ato_re);
				if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				}

			}
			else {
				System.out.println("No");
			}

		}
		else {
			System.out.println("No");
		}
	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[][] array = new int[3][3];
		String s = sc.next();
		List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		List<String> list_reverse=new ArrayList<String>(Arrays.asList(s.split("")));
		Collections.reverse(list_reverse);
		int a = (list.size()-1)/2;
		if(list.equals(list_reverse)) {
			List<String> list_mae=new ArrayList<String>();
			List<String> list_mae_re=new ArrayList<String>();
			for(int i=0;a>i;i++) {
				list_mae.add(list.get(i));
				list_mae_re.add(list.get(i));
			}
			Collections.reverse(list_mae_re);
			if(list_mae.equals(list_mae_re)) {
				List<String> list_ato=new ArrayList<String>();
				List<String> list_ato_re=new ArrayList<String>();
				for(int j=0;a>j;j++) {
					list_ato.add(list_reverse.get(j));
					list_ato_re.add(list_reverse.get(j));
				}
				Collections.reverse(list_ato_re);
				if(list_ato.equals(list_ato_re)) {
					System.out.println("Yes");
				}
				else {
					System.out.println("No");
				}

			}
			else {
				System.out.println("No");
			}

		}
		else {
			System.out.println("No");
		}
	}
}