import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class Main {

    public static void main(String[] args) throws Exception {
        PrintWriter out = new PrintWriter(System.out);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        StringBuilder sb = new StringBuilder(S);
        String reverse_1 = sb.reverse().toString();

        String S_2 = S.substring(0, (S.length()-1)/2);
        StringBuilder sb_2 = new StringBuilder(S_2);
        String reverse_2 = sb_2.reverse().toString();

        String S_3 = S.substring((S.length()+3)/2 - 1, S.length());
        StringBuilder sb_3 = new StringBuilder(S_3);
        String reverse_3 = sb_3.reverse().toString();
        if(S.equals(reverse_1) && S_2.equals(reverse_2) && S_3.equals(reverse_3)) {
            out.println("Yes");
        }else {
            out.println("No");
        }
        out.flush();
        out.close();
        br.close();
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io public class Main {

    public static void main(String[] args) throws Exception {
        PrintWriter out = new PrintWriter(System.out);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        StringBuilder sb = new StringBuilder(S);
        String reverse_1 = sb.reverse().toString();

        String S_2 = S.substring(0, (S.length()-1)/2);
        StringBuilder sb_2 = new StringBuilder(S_2);
        String reverse_2 = sb_2.reverse().toString();

        String S_3 = S.substring((S.length()+3)/2 - 1, S.length());
        StringBuilder sb_3 = new StringBuilder(S_3);
        String reverse_3 = sb_3.reverse().toString();
        if(S.equals(reverse_1) && S_2.equals(reverse_2) && S_3.equals(reverse_3)) {
            out.println("Yes");
        }else {
            out.println("No");
        }
        out.flush();
        out.close();
        br.close();
    }
} Main public static void main(String[] args) throws Exception {
        PrintWriter out = new PrintWriter(System.out);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        StringBuilder sb = new StringBuilder(S);
        String reverse_1 = sb.reverse().toString();

        String S_2 = S.substring(0, (S.length()-1)/2);
        StringBuilder sb_2 = new StringBuilder(S_2);
        String reverse_2 = sb_2.reverse().toString();

        String S_3 = S.substring((S.length()+3)/2 - 1, S.length());
        StringBuilder sb_3 = new StringBuilder(S_3);
        String reverse_3 = sb_3.reverse().toString();
        if(S.equals(reverse_1) && S_2.equals(reverse_2) && S_3.equals(reverse_3)) {
            out.println("Yes");
        }else {
            out.println("No");
        }
        out.flush();
        out.close();
        br.close();
    } main {
        PrintWriter out = new PrintWriter(System.out);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        StringBuilder sb = new StringBuilder(S);
        String reverse_1 = sb.reverse().toString();

        String S_2 = S.substring(0, (S.length()-1)/2);
        StringBuilder sb_2 = new StringBuilder(S_2);
        String reverse_2 = sb_2.reverse().toString();

        String S_3 = S.substring((S.length()+3)/2 - 1, S.length());
        StringBuilder sb_3 = new StringBuilder(S_3);
        String reverse_3 = sb_3.reverse().toString();
        if(S.equals(reverse_1) && S_2.equals(reverse_2) && S_3.equals(reverse_3)) {
            out.println("Yes");
        }else {
            out.println("No");
        }
        out.flush();
        out.close();
        br.close();
    } PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String S = br.readLine(); S br.readLine() br.readLine br StringBuilder sb = new StringBuilder(S); sb new StringBuilder(S) String reverse_1 = sb.reverse().toString(); reverse_1 sb.reverse().toString() sb.reverse().toString sb.reverse() sb.reverse sb String S_2 = S.substring(0, (S.length()-1)/2); S_2 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 StringBuilder sb_2 = new StringBuilder(S_2); sb_2 new StringBuilder(S_2) String reverse_2 = sb_2.reverse().toString(); reverse_2 sb_2.reverse().toString() sb_2.reverse().toString sb_2.reverse() sb_2.reverse sb_2 String S_3 = S.substring((S.length()+3)/2 - 1, S.length()); S_3 S.substring((S.length()+3)/2 - 1, S.length()) S.substring S (S.length()+3)/2 - 1 (S.length()+3)/2 (S.length()+3) S.length() S.length S 3 2 1 S.length() S.length S StringBuilder sb_3 = new StringBuilder(S_3); sb_3 new StringBuilder(S_3) String reverse_3 = sb_3.reverse().toString(); reverse_3 sb_3.reverse().toString() sb_3.reverse().toString sb_3.reverse() sb_3.reverse sb_3 if(S.equals(reverse_1) && S_2.equals(reverse_2) && S_3.equals(reverse_3)) {
            out.println("Yes");
        }else {
            out.println("No");
        } S.equals(reverse_1) && S_2.equals(reverse_2) && S_3.equals(reverse_3) S.equals(reverse_1) && S_2.equals(reverse_2) && S_3.equals(reverse_3) S.equals(reverse_1) S.equals S reverse_1 S_2.equals(reverse_2) S_2.equals S_2 reverse_2 S_3.equals(reverse_3) S_3.equals S_3 reverse_3 {
            out.println("Yes");
        } out.println("Yes") out.println out "Yes" {
            out.println("No");
        } out.println("No") out.println out "No" out.flush() out.flush out out.close() out.close out br.close() br.close br String[] args args public class Main {

    public static void main(String[] args) throws Exception {
        PrintWriter out = new PrintWriter(System.out);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        StringBuilder sb = new StringBuilder(S);
        String reverse_1 = sb.reverse().toString();

        String S_2 = S.substring(0, (S.length()-1)/2);
        StringBuilder sb_2 = new StringBuilder(S_2);
        String reverse_2 = sb_2.reverse().toString();

        String S_3 = S.substring((S.length()+3)/2 - 1, S.length());
        StringBuilder sb_3 = new StringBuilder(S_3);
        String reverse_3 = sb_3.reverse().toString();
        if(S.equals(reverse_1) && S_2.equals(reverse_2) && S_3.equals(reverse_3)) {
            out.println("Yes");
        }else {
            out.println("No");
        }
        out.flush();
        out.close();
        br.close();
    }
} public class Main {

    public static void main(String[] args) throws Exception {
        PrintWriter out = new PrintWriter(System.out);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        StringBuilder sb = new StringBuilder(S);
        String reverse_1 = sb.reverse().toString();

        String S_2 = S.substring(0, (S.length()-1)/2);
        StringBuilder sb_2 = new StringBuilder(S_2);
        String reverse_2 = sb_2.reverse().toString();

        String S_3 = S.substring((S.length()+3)/2 - 1, S.length());
        StringBuilder sb_3 = new StringBuilder(S_3);
        String reverse_3 = sb_3.reverse().toString();
        if(S.equals(reverse_1) && S_2.equals(reverse_2) && S_3.equals(reverse_3)) {
            out.println("Yes");
        }else {
            out.println("No");
        }
        out.flush();
        out.close();
        br.close();
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class Main {

    public static void main(String[] args) throws Exception {
        PrintWriter out = new PrintWriter(System.out);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String S = br.readLine();
        StringBuilder sb = new StringBuilder(S);
        String reverse_1 = sb.reverse().toString();

        String S_2 = S.substring(0, (S.length()-1)/2);
        StringBuilder sb_2 = new StringBuilder(S_2);
        String reverse_2 = sb_2.reverse().toString();

        String S_3 = S.substring((S.length()+3)/2 - 1, S.length());
        StringBuilder sb_3 = new StringBuilder(S_3);
        String reverse_3 = sb_3.reverse().toString();
        if(S.equals(reverse_1) && S_2.equals(reverse_2) && S_3.equals(reverse_3)) {
            out.println("Yes");
        }else {
            out.println("No");
        }
        out.flush();
        out.close();
        br.close();
    }
}