import java.util.Scanner;

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

        int l1 = (s.length()-1)/2;
        int l2 = (s.length()+3)/2;
        String a = s.substring(0, l1);
        String b = s.substring(l2-1);

        if(palindorme(s) && palindorme(a) && palindorme(b)){
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }

    private static boolean palindorme(String s) {
        int l = 0;
        int h = s.length()-1;

        while(l < h)
        {
            if(s.charAt(l) == s.charAt(h))
            {
                l++;
                h--;
            }
            else
            {
                return false;
            }
        }
        return true;
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();

        int l1 = (s.length()-1)/2;
        int l2 = (s.length()+3)/2;
        String a = s.substring(0, l1);
        String b = s.substring(l2-1);

        if(palindorme(s) && palindorme(a) && palindorme(b)){
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }

    private static boolean palindorme(String s) {
        int l = 0;
        int h = s.length()-1;

        while(l < h)
        {
            if(s.charAt(l) == s.charAt(h))
            {
                l++;
                h--;
            }
            else
            {
                return false;
            }
        }
        return true;
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();

        int l1 = (s.length()-1)/2;
        int l2 = (s.length()+3)/2;
        String a = s.substring(0, l1);
        String b = s.substring(l2-1);

        if(palindorme(s) && palindorme(a) && palindorme(b)){
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    } main {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();

        int l1 = (s.length()-1)/2;
        int l2 = (s.length()+3)/2;
        String a = s.substring(0, l1);
        String b = s.substring(l2-1);

        if(palindorme(s) && palindorme(a) && palindorme(b)){
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String s = in.nextLine(); s in.nextLine() in.nextLine in int l1 = (s.length()-1)/2; l1 (s.length()-1)/2 (s.length()-1) s.length() s.length s 1 2 int l2 = (s.length()+3)/2; l2 (s.length()+3)/2 (s.length()+3) s.length() s.length s 3 2 String a = s.substring(0, l1); a s.substring(0, l1) s.substring s 0 l1 String b = s.substring(l2-1); b s.substring(l2-1) s.substring s l2-1 l2 1 if(palindorme(s) && palindorme(a) && palindorme(b)){
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        } palindorme(s) && palindorme(a) && palindorme(b) palindorme(s) && palindorme(a) && palindorme(b) palindorme(s) palindorme s palindorme(a) palindorme a palindorme(b) palindorme b {
            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" String[] args args private static boolean palindorme(String s) {
        int l = 0;
        int h = s.length()-1;

        while(l < h)
        {
            if(s.charAt(l) == s.charAt(h))
            {
                l++;
                h--;
            }
            else
            {
                return false;
            }
        }
        return true;
    } palindorme {
        int l = 0;
        int h = s.length()-1;

        while(l < h)
        {
            if(s.charAt(l) == s.charAt(h))
            {
                l++;
                h--;
            }
            else
            {
                return false;
            }
        }
        return true;
    } int l = 0; l 0 int h = s.length()-1; h s.length()-1 s.length() s.length s 1 while(l < h)
        {
            if(s.charAt(l) == s.charAt(h))
            {
                l++;
                h--;
            }
            else
            {
                return false;
            }
        } l < h l h {
            if(s.charAt(l) == s.charAt(h))
            {
                l++;
                h--;
            }
            else
            {
                return false;
            }
        } if(s.charAt(l) == s.charAt(h))
            {
                l++;
                h--;
            }
            else
            {
                return false;
            } s.charAt(l) == s.charAt(h) s.charAt(l) s.charAt s l s.charAt(h) s.charAt s h {
                l++;
                h--;
            } l++ l h-- h {
                return false;
            } return false; false return true; true String s s
import java.util.Scanner;

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

        int l1 = (s.length()-1)/2;
        int l2 = (s.length()+3)/2;
        String a = s.substring(0, l1);
        String b = s.substring(l2-1);

        if(palindorme(s) && palindorme(a) && palindorme(b)){
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }

    private static boolean palindorme(String s) {
        int l = 0;
        int h = s.length()-1;

        while(l < h)
        {
            if(s.charAt(l) == s.charAt(h))
            {
                l++;
                h--;
            }
            else
            {
                return false;
            }
        }
        return true;
    }
}