import java.util.Scanner;

 
public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		boolean ans = true;
		StringBuffer sb = new StringBuffer();
		sb.append(S);
		
		//all
		StringBuffer reverce = sb.reverse();
		if(!S.equals(reverce.toString())) {
			ans = false;
		}
		
		//former
		String former = S.substring(0, (S.length() - 1) / 2);
		StringBuffer formerSb = new StringBuffer();
		formerSb.append(former);
		StringBuffer reverceFormer = formerSb.reverse();
		if(!former.equals(reverceFormer.toString())) {
			ans = false;
		}
		
		//latter
		String latter = S.substring((S.length() + 2) / 2, S.length());
		StringBuffer latterSb = new StringBuffer();
		latterSb.append(latter);
		StringBuffer reverceLatter = latterSb.reverse();
		if(!latter.equals(reverceLatter.toString())) {
			ans = false;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
	}
	
} import java.util.Scanner; Scanner java.util public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		boolean ans = true;
		StringBuffer sb = new StringBuffer();
		sb.append(S);
		
		//all
		StringBuffer reverce = sb.reverse();
		if(!S.equals(reverce.toString())) {
			ans = false;
		}
		
		//former
		String former = S.substring(0, (S.length() - 1) / 2);
		StringBuffer formerSb = new StringBuffer();
		formerSb.append(former);
		StringBuffer reverceFormer = formerSb.reverse();
		if(!former.equals(reverceFormer.toString())) {
			ans = false;
		}
		
		//latter
		String latter = S.substring((S.length() + 2) / 2, S.length());
		StringBuffer latterSb = new StringBuffer();
		latterSb.append(latter);
		StringBuffer reverceLatter = latterSb.reverse();
		if(!latter.equals(reverceLatter.toString())) {
			ans = false;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
	}
	
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		boolean ans = true;
		StringBuffer sb = new StringBuffer();
		sb.append(S);
		
		//all
		StringBuffer reverce = sb.reverse();
		if(!S.equals(reverce.toString())) {
			ans = false;
		}
		
		//former
		String former = S.substring(0, (S.length() - 1) / 2);
		StringBuffer formerSb = new StringBuffer();
		formerSb.append(former);
		StringBuffer reverceFormer = formerSb.reverse();
		if(!former.equals(reverceFormer.toString())) {
			ans = false;
		}
		
		//latter
		String latter = S.substring((S.length() + 2) / 2, S.length());
		StringBuffer latterSb = new StringBuffer();
		latterSb.append(latter);
		StringBuffer reverceLatter = latterSb.reverse();
		if(!latter.equals(reverceLatter.toString())) {
			ans = false;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
	} main {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		boolean ans = true;
		StringBuffer sb = new StringBuffer();
		sb.append(S);
		
		//all
		StringBuffer reverce = sb.reverse();
		if(!S.equals(reverce.toString())) {
			ans = false;
		}
		
		//former
		String former = S.substring(0, (S.length() - 1) / 2);
		StringBuffer formerSb = new StringBuffer();
		formerSb.append(former);
		StringBuffer reverceFormer = formerSb.reverse();
		if(!former.equals(reverceFormer.toString())) {
			ans = false;
		}
		
		//latter
		String latter = S.substring((S.length() + 2) / 2, S.length());
		StringBuffer latterSb = new StringBuffer();
		latterSb.append(latter);
		StringBuffer reverceLatter = latterSb.reverse();
		if(!latter.equals(reverceLatter.toString())) {
			ans = false;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc boolean ans = true; ans true StringBuffer sb = new StringBuffer(); sb new StringBuffer() sb.append(S) sb.append sb S StringBuffer reverce = sb.reverse(); reverce sb.reverse() sb.reverse sb if(!S.equals(reverce.toString())) {
			ans = false;
		} !S.equals(reverce.toString()) S.equals(reverce.toString()) S.equals S reverce.toString() reverce.toString reverce {
			ans = false;
		} ans = false ans false String former = S.substring(0, (S.length() - 1) / 2); former S.substring(0, (S.length() - 1) / 2) S.substring S 0 (S.length() - 1) / 2 (S.length() - 1) S.length() S.length S 1 2 StringBuffer formerSb = new StringBuffer(); formerSb new StringBuffer() formerSb.append(former) formerSb.append formerSb former StringBuffer reverceFormer = formerSb.reverse(); reverceFormer formerSb.reverse() formerSb.reverse formerSb if(!former.equals(reverceFormer.toString())) {
			ans = false;
		} !former.equals(reverceFormer.toString()) former.equals(reverceFormer.toString()) former.equals former reverceFormer.toString() reverceFormer.toString reverceFormer {
			ans = false;
		} ans = false ans false String latter = S.substring((S.length() + 2) / 2, S.length()); latter S.substring((S.length() + 2) / 2, S.length()) S.substring S (S.length() + 2) / 2 (S.length() + 2) S.length() S.length S 2 2 S.length() S.length S StringBuffer latterSb = new StringBuffer(); latterSb new StringBuffer() latterSb.append(latter) latterSb.append latterSb latter StringBuffer reverceLatter = latterSb.reverse(); reverceLatter latterSb.reverse() latterSb.reverse latterSb if(!latter.equals(reverceLatter.toString())) {
			ans = false;
		} !latter.equals(reverceLatter.toString()) latter.equals(reverceLatter.toString()) latter.equals latter reverceLatter.toString() reverceLatter.toString reverceLatter {
			ans = false;
		} ans = false ans false if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		} ans {
			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" sc.close() sc.close sc String[] args args public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		boolean ans = true;
		StringBuffer sb = new StringBuffer();
		sb.append(S);
		
		//all
		StringBuffer reverce = sb.reverse();
		if(!S.equals(reverce.toString())) {
			ans = false;
		}
		
		//former
		String former = S.substring(0, (S.length() - 1) / 2);
		StringBuffer formerSb = new StringBuffer();
		formerSb.append(former);
		StringBuffer reverceFormer = formerSb.reverse();
		if(!former.equals(reverceFormer.toString())) {
			ans = false;
		}
		
		//latter
		String latter = S.substring((S.length() + 2) / 2, S.length());
		StringBuffer latterSb = new StringBuffer();
		latterSb.append(latter);
		StringBuffer reverceLatter = latterSb.reverse();
		if(!latter.equals(reverceLatter.toString())) {
			ans = false;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
	}
	
} public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		boolean ans = true;
		StringBuffer sb = new StringBuffer();
		sb.append(S);
		
		//all
		StringBuffer reverce = sb.reverse();
		if(!S.equals(reverce.toString())) {
			ans = false;
		}
		
		//former
		String former = S.substring(0, (S.length() - 1) / 2);
		StringBuffer formerSb = new StringBuffer();
		formerSb.append(former);
		StringBuffer reverceFormer = formerSb.reverse();
		if(!former.equals(reverceFormer.toString())) {
			ans = false;
		}
		
		//latter
		String latter = S.substring((S.length() + 2) / 2, S.length());
		StringBuffer latterSb = new StringBuffer();
		latterSb.append(latter);
		StringBuffer reverceLatter = latterSb.reverse();
		if(!latter.equals(reverceLatter.toString())) {
			ans = false;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
	}
	
} Main
import java.util.Scanner;

 
public class Main {
 
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		boolean ans = true;
		StringBuffer sb = new StringBuffer();
		sb.append(S);
		
		//all
		StringBuffer reverce = sb.reverse();
		if(!S.equals(reverce.toString())) {
			ans = false;
		}
		
		//former
		String former = S.substring(0, (S.length() - 1) / 2);
		StringBuffer formerSb = new StringBuffer();
		formerSb.append(former);
		StringBuffer reverceFormer = formerSb.reverse();
		if(!former.equals(reverceFormer.toString())) {
			ans = false;
		}
		
		//latter
		String latter = S.substring((S.length() + 2) / 2, S.length());
		StringBuffer latterSb = new StringBuffer();
		latterSb.append(latter);
		StringBuffer reverceLatter = latterSb.reverse();
		if(!latter.equals(reverceLatter.toString())) {
			ans = false;
		}
		
		if(ans) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
		sc.close();
	}
	
}