import java.util.*;
import java.io.*;
public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		boolean ebishu = true;
		for(int i = 0 ; i < (s.length() - 1) / 2 && ebishu ; i++){
			if(s.charAt(i) != s.charAt(s.length() - i - 1)) ebishu = false;
			if(s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1)) ebishu = false;
			if(s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i)) ebishu = false;
		}
		if(ebishu) ou.print("Yes\n");
		else ou.print("No\n");
		ou.flush();
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		boolean ebishu = true;
		for(int i = 0 ; i < (s.length() - 1) / 2 && ebishu ; i++){
			if(s.charAt(i) != s.charAt(s.length() - i - 1)) ebishu = false;
			if(s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1)) ebishu = false;
			if(s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i)) ebishu = false;
		}
		if(ebishu) ou.print("Yes\n");
		else ou.print("No\n");
		ou.flush();
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		boolean ebishu = true;
		for(int i = 0 ; i < (s.length() - 1) / 2 && ebishu ; i++){
			if(s.charAt(i) != s.charAt(s.length() - i - 1)) ebishu = false;
			if(s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1)) ebishu = false;
			if(s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i)) ebishu = false;
		}
		if(ebishu) ou.print("Yes\n");
		else ou.print("No\n");
		ou.flush();
    } main {
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		boolean ebishu = true;
		for(int i = 0 ; i < (s.length() - 1) / 2 && ebishu ; i++){
			if(s.charAt(i) != s.charAt(s.length() - i - 1)) ebishu = false;
			if(s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1)) ebishu = false;
			if(s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i)) ebishu = false;
		}
		if(ebishu) ou.print("Yes\n");
		else ou.print("No\n");
		ou.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter ou = new PrintWriter(System.out); ou new PrintWriter(System.out) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc boolean ebishu = true; ebishu true for(int i = 0 ; i < (s.length() - 1) / 2 && ebishu ; i++){
			if(s.charAt(i) != s.charAt(s.length() - i - 1)) ebishu = false;
			if(s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1)) ebishu = false;
			if(s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i)) ebishu = false;
		} int i = 0 ; int i = 0 ; i 0 i < (s.length() - 1) / 2 && ebishu i < (s.length() - 1) / 2 i (s.length() - 1) / 2 (s.length() - 1) s.length() s.length s 1 2 ebishu i++ i++ i {
			if(s.charAt(i) != s.charAt(s.length() - i - 1)) ebishu = false;
			if(s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1)) ebishu = false;
			if(s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i)) ebishu = false;
		} {
			if(s.charAt(i) != s.charAt(s.length() - i - 1)) ebishu = false;
			if(s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1)) ebishu = false;
			if(s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i)) ebishu = false;
		} if(s.charAt(i) != s.charAt(s.length() - i - 1)) ebishu = false; s.charAt(i) != s.charAt(s.length() - i - 1) s.charAt(i) s.charAt s i s.charAt(s.length() - i - 1) s.charAt s s.length() - i - 1 s.length() - i - 1 s.length() s.length s i 1 ebishu = false ebishu false if(s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1)) ebishu = false; s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1) s.charAt(i) s.charAt s i s.charAt((s.length() - 1) / 2 - i - 1) s.charAt s (s.length() - 1) / 2 - i - 1 (s.length() - 1) / 2 - i - 1 (s.length() - 1) / 2 (s.length() - 1) s.length() s.length s 1 2 i 1 ebishu = false ebishu false if(s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i)) ebishu = false; s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i) s.charAt((s.length() - 1) / 2 + 1 + i) s.charAt s (s.length() - 1) / 2 + 1 + i (s.length() - 1) / 2 + 1 + i (s.length() - 1) / 2 (s.length() - 1) s.length() s.length s 1 2 1 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 ebishu = false ebishu false if(ebishu) ou.print("Yes\n");
		else ou.print("No\n"); ebishu ou.print("Yes\n") ou.print ou "Yes\n" ou.print("No\n") ou.print ou "No\n" ou.flush() ou.flush ou String[] args args public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		boolean ebishu = true;
		for(int i = 0 ; i < (s.length() - 1) / 2 && ebishu ; i++){
			if(s.charAt(i) != s.charAt(s.length() - i - 1)) ebishu = false;
			if(s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1)) ebishu = false;
			if(s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i)) ebishu = false;
		}
		if(ebishu) ou.print("Yes\n");
		else ou.print("No\n");
		ou.flush();
    }
} public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		boolean ebishu = true;
		for(int i = 0 ; i < (s.length() - 1) / 2 && ebishu ; i++){
			if(s.charAt(i) != s.charAt(s.length() - i - 1)) ebishu = false;
			if(s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1)) ebishu = false;
			if(s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i)) ebishu = false;
		}
		if(ebishu) ou.print("Yes\n");
		else ou.print("No\n");
		ou.flush();
    }
} Main
import java.util.*;
import java.io.*;
public class Main{
    public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		PrintWriter ou = new PrintWriter(System.out);
		String s = sc.next();
		sc.close();
		boolean ebishu = true;
		for(int i = 0 ; i < (s.length() - 1) / 2 && ebishu ; i++){
			if(s.charAt(i) != s.charAt(s.length() - i - 1)) ebishu = false;
			if(s.charAt(i) != s.charAt((s.length() - 1) / 2 - i - 1)) ebishu = false;
			if(s.charAt((s.length() - 1) / 2 + 1 + i) != s.charAt(s.length() - 1 - i)) ebishu = false;
		}
		if(ebishu) ou.print("Yes\n");
		else ou.print("No\n");
		ou.flush();
    }
}