import java.util.Scanner;

public class Main {

    boolean check1(String str) {
        int n = str.length();
        int i = 0, j = n - 1;
        while (i < j) {
            if (str.charAt(i) != str.charAt(j))
                return false;
            i++;
            j--;
        }
    return true;
}

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int n=str.length();
        int flag=0;
       Main ob1=new Main();
            if(ob1.check1(str)){
                if (n==3 || ob1.check1(str.substring(0,((n-1)/2))))
                    if (n==3 || ob1.check1(str.substring((n+3/2)-2,n)))
                       flag=1;

            }
            if(flag==1)
                System.out.println("Yes");
            else
                System.out.println("No");
        }

    } import java.util.Scanner; Scanner java.util public class Main {

    boolean check1(String str) {
        int n = str.length();
        int i = 0, j = n - 1;
        while (i < j) {
            if (str.charAt(i) != str.charAt(j))
                return false;
            i++;
            j--;
        }
    return true;
}

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int n=str.length();
        int flag=0;
       Main ob1=new Main();
            if(ob1.check1(str)){
                if (n==3 || ob1.check1(str.substring(0,((n-1)/2))))
                    if (n==3 || ob1.check1(str.substring((n+3/2)-2,n)))
                       flag=1;

            }
            if(flag==1)
                System.out.println("Yes");
            else
                System.out.println("No");
        }

    } Main boolean check1(String str) {
        int n = str.length();
        int i = 0, j = n - 1;
        while (i < j) {
            if (str.charAt(i) != str.charAt(j))
                return false;
            i++;
            j--;
        }
    return true;
} check1 {
        int n = str.length();
        int i = 0, j = n - 1;
        while (i < j) {
            if (str.charAt(i) != str.charAt(j))
                return false;
            i++;
            j--;
        }
    return true;
} int n = str.length(); n str.length() str.length str int i = 0 i 0 j = n - 1; j n - 1 n 1 while (i < j) {
            if (str.charAt(i) != str.charAt(j))
                return false;
            i++;
            j--;
        } i < j i j {
            if (str.charAt(i) != str.charAt(j))
                return false;
            i++;
            j--;
        } if (str.charAt(i) != str.charAt(j))
                return false; str.charAt(i) != str.charAt(j) str.charAt(i) str.charAt str i str.charAt(j) str.charAt str j return false; false i++ i j-- j return true; true String str str public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int n=str.length();
        int flag=0;
       Main ob1=new Main();
            if(ob1.check1(str)){
                if (n==3 || ob1.check1(str.substring(0,((n-1)/2))))
                    if (n==3 || ob1.check1(str.substring((n+3/2)-2,n)))
                       flag=1;

            }
            if(flag==1)
                System.out.println("Yes");
            else
                System.out.println("No");
        } main {

        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int n=str.length();
        int flag=0;
       Main ob1=new Main();
            if(ob1.check1(str)){
                if (n==3 || ob1.check1(str.substring(0,((n-1)/2))))
                    if (n==3 || ob1.check1(str.substring((n+3/2)-2,n)))
                       flag=1;

            }
            if(flag==1)
                System.out.println("Yes");
            else
                System.out.println("No");
        } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str=sc.next(); str sc.next() sc.next sc int n=str.length(); n str.length() str.length str int flag=0; flag 0 Main ob1=new Main(); ob1 new Main() if(ob1.check1(str)){
                if (n==3 || ob1.check1(str.substring(0,((n-1)/2))))
                    if (n==3 || ob1.check1(str.substring((n+3/2)-2,n)))
                       flag=1;

            } ob1.check1(str) ob1.check1 ob1 str {
                if (n==3 || ob1.check1(str.substring(0,((n-1)/2))))
                    if (n==3 || ob1.check1(str.substring((n+3/2)-2,n)))
                       flag=1;

            } if (n==3 || ob1.check1(str.substring(0,((n-1)/2))))
                    if (n==3 || ob1.check1(str.substring((n+3/2)-2,n)))
                       flag=1; n==3 || ob1.check1(str.substring(0,((n-1)/2))) n==3 n 3 ob1.check1(str.substring(0,((n-1)/2))) ob1.check1 ob1 str.substring(0,((n-1)/2)) str.substring str 0 ((n-1)/2) (n-1) n 1 2 if (n==3 || ob1.check1(str.substring((n+3/2)-2,n)))
                       flag=1; n==3 || ob1.check1(str.substring((n+3/2)-2,n)) n==3 n 3 ob1.check1(str.substring((n+3/2)-2,n)) ob1.check1 ob1 str.substring((n+3/2)-2,n) str.substring str (n+3/2)-2 (n+3/2) n 3/2 3 2 2 n flag=1 flag 1 if(flag==1)
                System.out.println("Yes");
            else
                System.out.println("No"); flag==1 flag 1 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 {

    boolean check1(String str) {
        int n = str.length();
        int i = 0, j = n - 1;
        while (i < j) {
            if (str.charAt(i) != str.charAt(j))
                return false;
            i++;
            j--;
        }
    return true;
}

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int n=str.length();
        int flag=0;
       Main ob1=new Main();
            if(ob1.check1(str)){
                if (n==3 || ob1.check1(str.substring(0,((n-1)/2))))
                    if (n==3 || ob1.check1(str.substring((n+3/2)-2,n)))
                       flag=1;

            }
            if(flag==1)
                System.out.println("Yes");
            else
                System.out.println("No");
        }

    } public class Main {

    boolean check1(String str) {
        int n = str.length();
        int i = 0, j = n - 1;
        while (i < j) {
            if (str.charAt(i) != str.charAt(j))
                return false;
            i++;
            j--;
        }
    return true;
}

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int n=str.length();
        int flag=0;
       Main ob1=new Main();
            if(ob1.check1(str)){
                if (n==3 || ob1.check1(str.substring(0,((n-1)/2))))
                    if (n==3 || ob1.check1(str.substring((n+3/2)-2,n)))
                       flag=1;

            }
            if(flag==1)
                System.out.println("Yes");
            else
                System.out.println("No");
        }

    } Main
import java.util.Scanner;

public class Main {

    boolean check1(String str) {
        int n = str.length();
        int i = 0, j = n - 1;
        while (i < j) {
            if (str.charAt(i) != str.charAt(j))
                return false;
            i++;
            j--;
        }
    return true;
}

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        int n=str.length();
        int flag=0;
       Main ob1=new Main();
            if(ob1.check1(str)){
                if (n==3 || ob1.check1(str.substring(0,((n-1)/2))))
                    if (n==3 || ob1.check1(str.substring((n+3/2)-2,n)))
                       flag=1;

            }
            if(flag==1)
                System.out.println("Yes");
            else
                System.out.println("No");
        }

    }
