import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String rs = "";
        for (int i = s.length() - 1; i >= 0; i--) {
            rs += s.charAt(i);
        }

        String prev = s.substring(0, (s.length() - 1) / 2);
        String rprev = "";
        for (int i = prev.length() - 1; i >= 0; i--) {
            rprev += prev.charAt(i);
        }

        String after = s.substring(((s.length() + 3) / 2) - 1);
        String rafter = "";
        for (int i = after.length() - 1; i >= 0; i--) {
            rafter += after.charAt(i);
        }

        if (s.equals(rs) && prev.equals(rprev) && after.equals(rafter)) {
            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();
        String rs = "";
        for (int i = s.length() - 1; i >= 0; i--) {
            rs += s.charAt(i);
        }

        String prev = s.substring(0, (s.length() - 1) / 2);
        String rprev = "";
        for (int i = prev.length() - 1; i >= 0; i--) {
            rprev += prev.charAt(i);
        }

        String after = s.substring(((s.length() + 3) / 2) - 1);
        String rafter = "";
        for (int i = after.length() - 1; i >= 0; i--) {
            rafter += after.charAt(i);
        }

        if (s.equals(rs) && prev.equals(rprev) && after.equals(rafter)) {
            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();
        String rs = "";
        for (int i = s.length() - 1; i >= 0; i--) {
            rs += s.charAt(i);
        }

        String prev = s.substring(0, (s.length() - 1) / 2);
        String rprev = "";
        for (int i = prev.length() - 1; i >= 0; i--) {
            rprev += prev.charAt(i);
        }

        String after = s.substring(((s.length() + 3) / 2) - 1);
        String rafter = "";
        for (int i = after.length() - 1; i >= 0; i--) {
            rafter += after.charAt(i);
        }

        if (s.equals(rs) && prev.equals(rprev) && after.equals(rafter)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String rs = "";
        for (int i = s.length() - 1; i >= 0; i--) {
            rs += s.charAt(i);
        }

        String prev = s.substring(0, (s.length() - 1) / 2);
        String rprev = "";
        for (int i = prev.length() - 1; i >= 0; i--) {
            rprev += prev.charAt(i);
        }

        String after = s.substring(((s.length() + 3) / 2) - 1);
        String rafter = "";
        for (int i = after.length() - 1; i >= 0; i--) {
            rafter += after.charAt(i);
        }

        if (s.equals(rs) && prev.equals(rprev) && after.equals(rafter)) {
            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 String rs = ""; rs "" for (int i = s.length() - 1; i >= 0; i--) {
            rs += s.charAt(i);
        } int i = s.length() - 1; int i = s.length() - 1; i s.length() - 1 s.length() s.length s 1 i >= 0 i 0 i-- i-- i {
            rs += s.charAt(i);
        } {
            rs += s.charAt(i);
        } rs += s.charAt(i) rs s.charAt(i) s.charAt s i String prev = s.substring(0, (s.length() - 1) / 2); prev 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 String rprev = ""; rprev "" for (int i = prev.length() - 1; i >= 0; i--) {
            rprev += prev.charAt(i);
        } int i = prev.length() - 1; int i = prev.length() - 1; i prev.length() - 1 prev.length() prev.length prev 1 i >= 0 i 0 i-- i-- i {
            rprev += prev.charAt(i);
        } {
            rprev += prev.charAt(i);
        } rprev += prev.charAt(i) rprev prev.charAt(i) prev.charAt prev i String after = s.substring(((s.length() + 3) / 2) - 1); after s.substring(((s.length() + 3) / 2) - 1) s.substring s ((s.length() + 3) / 2) - 1 ((s.length() + 3) / 2) (s.length() + 3) s.length() s.length s 3 2 1 String rafter = ""; rafter "" for (int i = after.length() - 1; i >= 0; i--) {
            rafter += after.charAt(i);
        } int i = after.length() - 1; int i = after.length() - 1; i after.length() - 1 after.length() after.length after 1 i >= 0 i 0 i-- i-- i {
            rafter += after.charAt(i);
        } {
            rafter += after.charAt(i);
        } rafter += after.charAt(i) rafter after.charAt(i) after.charAt after i if (s.equals(rs) && prev.equals(rprev) && after.equals(rafter)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } s.equals(rs) && prev.equals(rprev) && after.equals(rafter) s.equals(rs) && prev.equals(rprev) && after.equals(rafter) s.equals(rs) s.equals s rs prev.equals(rprev) prev.equals prev rprev after.equals(rafter) after.equals after rafter {
            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 public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String rs = "";
        for (int i = s.length() - 1; i >= 0; i--) {
            rs += s.charAt(i);
        }

        String prev = s.substring(0, (s.length() - 1) / 2);
        String rprev = "";
        for (int i = prev.length() - 1; i >= 0; i--) {
            rprev += prev.charAt(i);
        }

        String after = s.substring(((s.length() + 3) / 2) - 1);
        String rafter = "";
        for (int i = after.length() - 1; i >= 0; i--) {
            rafter += after.charAt(i);
        }

        if (s.equals(rs) && prev.equals(rprev) && after.equals(rafter)) {
            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();
        String rs = "";
        for (int i = s.length() - 1; i >= 0; i--) {
            rs += s.charAt(i);
        }

        String prev = s.substring(0, (s.length() - 1) / 2);
        String rprev = "";
        for (int i = prev.length() - 1; i >= 0; i--) {
            rprev += prev.charAt(i);
        }

        String after = s.substring(((s.length() + 3) / 2) - 1);
        String rafter = "";
        for (int i = after.length() - 1; i >= 0; i--) {
            rafter += after.charAt(i);
        }

        if (s.equals(rs) && prev.equals(rprev) && after.equals(rafter)) {
            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();
        String rs = "";
        for (int i = s.length() - 1; i >= 0; i--) {
            rs += s.charAt(i);
        }

        String prev = s.substring(0, (s.length() - 1) / 2);
        String rprev = "";
        for (int i = prev.length() - 1; i >= 0; i--) {
            rprev += prev.charAt(i);
        }

        String after = s.substring(((s.length() + 3) / 2) - 1);
        String rafter = "";
        for (int i = after.length() - 1; i >= 0; i--) {
            rafter += after.charAt(i);
        }

        if (s.equals(rs) && prev.equals(rprev) && after.equals(rafter)) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}