import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		char[] charList = S.toCharArray();
		int n = S.length();

        boolean condition = false;

        String left = S.substring(0, (n-1)/2-1);
        String right = S.substring((n-1)/2+1, n-1);
        if(left.equals(right))
        {
        	if(charList[0] == charList[((n-1)/2)-1])
        	{
        		if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		}
        	}
        }

        if(condition)
        	System.out.println("Yes");
        else
        	System.out.println("No");
	}
} 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();
		char[] charList = S.toCharArray();
		int n = S.length();

        boolean condition = false;

        String left = S.substring(0, (n-1)/2-1);
        String right = S.substring((n-1)/2+1, n-1);
        if(left.equals(right))
        {
        	if(charList[0] == charList[((n-1)/2)-1])
        	{
        		if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		}
        	}
        }

        if(condition)
        	System.out.println("Yes");
        else
        	System.out.println("No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		char[] charList = S.toCharArray();
		int n = S.length();

        boolean condition = false;

        String left = S.substring(0, (n-1)/2-1);
        String right = S.substring((n-1)/2+1, n-1);
        if(left.equals(right))
        {
        	if(charList[0] == charList[((n-1)/2)-1])
        	{
        		if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		}
        	}
        }

        if(condition)
        	System.out.println("Yes");
        else
        	System.out.println("No");
	} main {
		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		char[] charList = S.toCharArray();
		int n = S.length();

        boolean condition = false;

        String left = S.substring(0, (n-1)/2-1);
        String right = S.substring((n-1)/2+1, n-1);
        if(left.equals(right))
        {
        	if(charList[0] == charList[((n-1)/2)-1])
        	{
        		if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		}
        	}
        }

        if(condition)
        	System.out.println("Yes");
        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 char[] charList = S.toCharArray(); charList S.toCharArray() S.toCharArray S int n = S.length(); n S.length() S.length S boolean condition = false; condition false String left = S.substring(0, (n-1)/2-1); left S.substring(0, (n-1)/2-1) S.substring S 0 (n-1)/2-1 (n-1)/2 (n-1) n 1 2 1 String right = S.substring((n-1)/2+1, n-1); right S.substring((n-1)/2+1, n-1) S.substring S (n-1)/2+1 (n-1)/2 (n-1) n 1 2 1 n-1 n 1 if(left.equals(right))
        {
        	if(charList[0] == charList[((n-1)/2)-1])
        	{
        		if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		}
        	}
        } left.equals(right) left.equals left right {
        	if(charList[0] == charList[((n-1)/2)-1])
        	{
        		if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		}
        	}
        } if(charList[0] == charList[((n-1)/2)-1])
        	{
        		if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		}
        	} charList[0] == charList[((n-1)/2)-1] charList[0] charList 0 charList[((n-1)/2)-1] charList ((n-1)/2)-1 ((n-1)/2) (n-1) n 1 2 1 {
        		if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		}
        	} if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		} charList[((n+3)/2)-1] == charList[n-1] charList[((n+3)/2)-1] charList ((n+3)/2)-1 ((n+3)/2) (n+3) n 3 2 1 charList[n-1] charList n-1 n 1 {
        			condition = true;
        		} condition = true condition true if(condition)
        	System.out.println("Yes");
        else
        	System.out.println("No"); condition 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 class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		char[] charList = S.toCharArray();
		int n = S.length();

        boolean condition = false;

        String left = S.substring(0, (n-1)/2-1);
        String right = S.substring((n-1)/2+1, n-1);
        if(left.equals(right))
        {
        	if(charList[0] == charList[((n-1)/2)-1])
        	{
        		if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		}
        	}
        }

        if(condition)
        	System.out.println("Yes");
        else
        	System.out.println("No");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		char[] charList = S.toCharArray();
		int n = S.length();

        boolean condition = false;

        String left = S.substring(0, (n-1)/2-1);
        String right = S.substring((n-1)/2+1, n-1);
        if(left.equals(right))
        {
        	if(charList[0] == charList[((n-1)/2)-1])
        	{
        		if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		}
        	}
        }

        if(condition)
        	System.out.println("Yes");
        else
        	System.out.println("No");
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String S = sc.next();
		char[] charList = S.toCharArray();
		int n = S.length();

        boolean condition = false;

        String left = S.substring(0, (n-1)/2-1);
        String right = S.substring((n-1)/2+1, n-1);
        if(left.equals(right))
        {
        	if(charList[0] == charList[((n-1)/2)-1])
        	{
        		if(charList[((n+3)/2)-1] == charList[n-1])
        		{
        			condition = true;
        		}
        	}
        }

        if(condition)
        	System.out.println("Yes");
        else
        	System.out.println("No");
	}
}
