import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
//        int t = in.nextInt();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task {
        public void solve(int testNumber, InputReader in, PrintWriter out) throws IOException {
            String s = in.next();
            String l = s.substring(0, (s.length() - 1)/2);
            String r = s.substring((s.length() + 3) / 2 - 1);
            if (isPalin(s) && isPalin(l) && isPalin(r)){
                out.println("Yes");
            }else{
                out.println("No");
            }
        }
        public static boolean isPalin(String s){
            int start = 0;
            int end = s.length() - 1;
            return isPalin(s, start, end);
        }

        private static boolean isPalin(String s, int start, int end) {
            if (start > end){
                return true;
            }
            return (s.charAt(start) == s.charAt(end)) && isPalin(s, start+1, end-1);
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public char nextChar() {
            return next().charAt(0);
        }

        public String nextLine() throws IOException {
            return reader.readLine().trim();
        }
    }
} import java.io.*; io.* java import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
//        int t = in.nextInt();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task {
        public void solve(int testNumber, InputReader in, PrintWriter out) throws IOException {
            String s = in.next();
            String l = s.substring(0, (s.length() - 1)/2);
            String r = s.substring((s.length() + 3) / 2 - 1);
            if (isPalin(s) && isPalin(l) && isPalin(r)){
                out.println("Yes");
            }else{
                out.println("No");
            }
        }
        public static boolean isPalin(String s){
            int start = 0;
            int end = s.length() - 1;
            return isPalin(s, start, end);
        }

        private static boolean isPalin(String s, int start, int end) {
            if (start > end){
                return true;
            }
            return (s.charAt(start) == s.charAt(end)) && isPalin(s, start+1, end-1);
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public char nextChar() {
            return next().charAt(0);
        }

        public String nextLine() throws IOException {
            return reader.readLine().trim();
        }
    }
} Main public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
//        int t = in.nextInt();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
//        int t = in.nextInt();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out InputReader in = new InputReader(inputStream); in new InputReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) Task solver = new Task(); solver new Task() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class Task {
        public void solve(int testNumber, InputReader in, PrintWriter out) throws IOException {
            String s = in.next();
            String l = s.substring(0, (s.length() - 1)/2);
            String r = s.substring((s.length() + 3) / 2 - 1);
            if (isPalin(s) && isPalin(l) && isPalin(r)){
                out.println("Yes");
            }else{
                out.println("No");
            }
        }
        public static boolean isPalin(String s){
            int start = 0;
            int end = s.length() - 1;
            return isPalin(s, start, end);
        }

        private static boolean isPalin(String s, int start, int end) {
            if (start > end){
                return true;
            }
            return (s.charAt(start) == s.charAt(end)) && isPalin(s, start+1, end-1);
        }
    } Task public void solve(int testNumber, InputReader in, PrintWriter out) throws IOException {
            String s = in.next();
            String l = s.substring(0, (s.length() - 1)/2);
            String r = s.substring((s.length() + 3) / 2 - 1);
            if (isPalin(s) && isPalin(l) && isPalin(r)){
                out.println("Yes");
            }else{
                out.println("No");
            }
        } solve {
            String s = in.next();
            String l = s.substring(0, (s.length() - 1)/2);
            String r = s.substring((s.length() + 3) / 2 - 1);
            if (isPalin(s) && isPalin(l) && isPalin(r)){
                out.println("Yes");
            }else{
                out.println("No");
            }
        } String s = in.next(); s in.next() in.next in String l = s.substring(0, (s.length() - 1)/2); l 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 r = s.substring((s.length() + 3) / 2 - 1); r 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 if (isPalin(s) && isPalin(l) && isPalin(r)){
                out.println("Yes");
            }else{
                out.println("No");
            } isPalin(s) && isPalin(l) && isPalin(r) isPalin(s) && isPalin(l) && isPalin(r) isPalin(s) isPalin s isPalin(l) isPalin l isPalin(r) isPalin r {
                out.println("Yes");
            } out.println("Yes") out.println out "Yes" {
                out.println("No");
            } out.println("No") out.println out "No" int testNumber testNumber InputReader in in PrintWriter out out public static boolean isPalin(String s){
            int start = 0;
            int end = s.length() - 1;
            return isPalin(s, start, end);
        } isPalin {
            int start = 0;
            int end = s.length() - 1;
            return isPalin(s, start, end);
        } int start = 0; start 0 int end = s.length() - 1; end s.length() - 1 s.length() s.length s 1 return isPalin(s, start, end); isPalin(s, start, end) isPalin s start end String s s private static boolean isPalin(String s, int start, int end) {
            if (start > end){
                return true;
            }
            return (s.charAt(start) == s.charAt(end)) && isPalin(s, start+1, end-1);
        } isPalin {
            if (start > end){
                return true;
            }
            return (s.charAt(start) == s.charAt(end)) && isPalin(s, start+1, end-1);
        } if (start > end){
                return true;
            } start > end start end {
                return true;
            } return true; true return (s.charAt(start) == s.charAt(end)) && isPalin(s, start+1, end-1); (s.charAt(start) == s.charAt(end)) && isPalin(s, start+1, end-1) (s.charAt(start) == s.charAt(end)) s.charAt(start) s.charAt s start s.charAt(end) s.charAt s end isPalin(s, start+1, end-1) isPalin s start+1 start 1 end-1 end 1 String s s int start start int end end static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public char nextChar() {
            return next().charAt(0);
        }

        public String nextLine() throws IOException {
            return reader.readLine().trim();
        }
    } InputReader public BufferedReader reader; reader public StringTokenizer tokenizer; tokenizer public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } InputReader {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } reader = new BufferedReader(new InputStreamReader(stream), 32768) reader new BufferedReader(new InputStreamReader(stream), 32768) tokenizer = null tokenizer null InputStream stream stream public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } next {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    tokenizer = new StringTokenizer(reader.readLine());
                } tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public double nextDouble() {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public char nextChar() {
            return next().charAt(0);
        } nextChar {
            return next().charAt(0);
        } return next().charAt(0); next().charAt(0) next().charAt next() next 0 public String nextLine() throws IOException {
            return reader.readLine().trim();
        } nextLine {
            return reader.readLine().trim();
        } return reader.readLine().trim(); reader.readLine().trim() reader.readLine().trim reader.readLine() reader.readLine reader public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
//        int t = in.nextInt();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task {
        public void solve(int testNumber, InputReader in, PrintWriter out) throws IOException {
            String s = in.next();
            String l = s.substring(0, (s.length() - 1)/2);
            String r = s.substring((s.length() + 3) / 2 - 1);
            if (isPalin(s) && isPalin(l) && isPalin(r)){
                out.println("Yes");
            }else{
                out.println("No");
            }
        }
        public static boolean isPalin(String s){
            int start = 0;
            int end = s.length() - 1;
            return isPalin(s, start, end);
        }

        private static boolean isPalin(String s, int start, int end) {
            if (start > end){
                return true;
            }
            return (s.charAt(start) == s.charAt(end)) && isPalin(s, start+1, end-1);
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public char nextChar() {
            return next().charAt(0);
        }

        public String nextLine() throws IOException {
            return reader.readLine().trim();
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
//        int t = in.nextInt();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task {
        public void solve(int testNumber, InputReader in, PrintWriter out) throws IOException {
            String s = in.next();
            String l = s.substring(0, (s.length() - 1)/2);
            String r = s.substring((s.length() + 3) / 2 - 1);
            if (isPalin(s) && isPalin(l) && isPalin(r)){
                out.println("Yes");
            }else{
                out.println("No");
            }
        }
        public static boolean isPalin(String s){
            int start = 0;
            int end = s.length() - 1;
            return isPalin(s, start, end);
        }

        private static boolean isPalin(String s, int start, int end) {
            if (start > end){
                return true;
            }
            return (s.charAt(start) == s.charAt(end)) && isPalin(s, start+1, end-1);
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public char nextChar() {
            return next().charAt(0);
        }

        public String nextLine() throws IOException {
            return reader.readLine().trim();
        }
    }
} Main
import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
//        int t = in.nextInt();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task {
        public void solve(int testNumber, InputReader in, PrintWriter out) throws IOException {
            String s = in.next();
            String l = s.substring(0, (s.length() - 1)/2);
            String r = s.substring((s.length() + 3) / 2 - 1);
            if (isPalin(s) && isPalin(l) && isPalin(r)){
                out.println("Yes");
            }else{
                out.println("No");
            }
        }
        public static boolean isPalin(String s){
            int start = 0;
            int end = s.length() - 1;
            return isPalin(s, start, end);
        }

        private static boolean isPalin(String s, int start, int end) {
            if (start > end){
                return true;
            }
            return (s.charAt(start) == s.charAt(end)) && isPalin(s, start+1, end-1);
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public char nextChar() {
            return next().charAt(0);
        }

        public String nextLine() throws IOException {
            return reader.readLine().trim();
        }
    }
}
