import java .util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	String inputS = sc.next();

	ArrayList<String>  slist = new ArrayList<>();
	ArrayList<String>  first = new ArrayList<>();
	ArrayList<String>  second = new ArrayList<>();

	for(int i = 0; i < inputS.length(); i++) {
		slist.add(inputS.substring(i, i+1));
	}

	for(int i = 0; i < (inputS.length() - 1) /2; i++) {
			first.add(slist.get(i));
	}

	for(int i = (inputS.length() + 3) / 2 -1; i < inputS.length(); i ++) {
		second.add(slist.get(i));
	}

	String str1 = String.join("", first);
	String str2 = String.join("", second);

	if(isPalindrome(str1) && isPalindrome(str2) && isPalindrome(inputS)) {
		System.out.println("Yes");
	}else {
		System.out.println("No");
	}

}

public static boolean isPalindrome(String sentence) {
    int minIdx = 0;
    int maxIdx = sentence.length() - 1;

    while(minIdx < maxIdx) {
        if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
            return false;
        }
    }
    return true;
}
} import java .util.ArrayList; ArrayList java .util import java.util.Scanner; Scanner java.util public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	String inputS = sc.next();

	ArrayList<String>  slist = new ArrayList<>();
	ArrayList<String>  first = new ArrayList<>();
	ArrayList<String>  second = new ArrayList<>();

	for(int i = 0; i < inputS.length(); i++) {
		slist.add(inputS.substring(i, i+1));
	}

	for(int i = 0; i < (inputS.length() - 1) /2; i++) {
			first.add(slist.get(i));
	}

	for(int i = (inputS.length() + 3) / 2 -1; i < inputS.length(); i ++) {
		second.add(slist.get(i));
	}

	String str1 = String.join("", first);
	String str2 = String.join("", second);

	if(isPalindrome(str1) && isPalindrome(str2) && isPalindrome(inputS)) {
		System.out.println("Yes");
	}else {
		System.out.println("No");
	}

}

public static boolean isPalindrome(String sentence) {
    int minIdx = 0;
    int maxIdx = sentence.length() - 1;

    while(minIdx < maxIdx) {
        if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
            return false;
        }
    }
    return true;
}
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	String inputS = sc.next();

	ArrayList<String>  slist = new ArrayList<>();
	ArrayList<String>  first = new ArrayList<>();
	ArrayList<String>  second = new ArrayList<>();

	for(int i = 0; i < inputS.length(); i++) {
		slist.add(inputS.substring(i, i+1));
	}

	for(int i = 0; i < (inputS.length() - 1) /2; i++) {
			first.add(slist.get(i));
	}

	for(int i = (inputS.length() + 3) / 2 -1; i < inputS.length(); i ++) {
		second.add(slist.get(i));
	}

	String str1 = String.join("", first);
	String str2 = String.join("", second);

	if(isPalindrome(str1) && isPalindrome(str2) && isPalindrome(inputS)) {
		System.out.println("Yes");
	}else {
		System.out.println("No");
	}

} main {
	Scanner sc = new Scanner(System.in);

	String inputS = sc.next();

	ArrayList<String>  slist = new ArrayList<>();
	ArrayList<String>  first = new ArrayList<>();
	ArrayList<String>  second = new ArrayList<>();

	for(int i = 0; i < inputS.length(); i++) {
		slist.add(inputS.substring(i, i+1));
	}

	for(int i = 0; i < (inputS.length() - 1) /2; i++) {
			first.add(slist.get(i));
	}

	for(int i = (inputS.length() + 3) / 2 -1; i < inputS.length(); i ++) {
		second.add(slist.get(i));
	}

	String str1 = String.join("", first);
	String str2 = String.join("", second);

	if(isPalindrome(str1) && isPalindrome(str2) && isPalindrome(inputS)) {
		System.out.println("Yes");
	}else {
		System.out.println("No");
	}

} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String inputS = sc.next(); inputS sc.next() sc.next sc ArrayList<String>  slist = new ArrayList<>(); slist new ArrayList<>() ArrayList<String>  first = new ArrayList<>(); first new ArrayList<>() ArrayList<String>  second = new ArrayList<>(); second new ArrayList<>() for(int i = 0; i < inputS.length(); i++) {
		slist.add(inputS.substring(i, i+1));
	} int i = 0; int i = 0; i 0 i < inputS.length() i inputS.length() inputS.length inputS i++ i++ i {
		slist.add(inputS.substring(i, i+1));
	} {
		slist.add(inputS.substring(i, i+1));
	} slist.add(inputS.substring(i, i+1)) slist.add slist inputS.substring(i, i+1) inputS.substring inputS i i+1 i 1 for(int i = 0; i < (inputS.length() - 1) /2; i++) {
			first.add(slist.get(i));
	} int i = 0; int i = 0; i 0 i < (inputS.length() - 1) /2 i (inputS.length() - 1) /2 (inputS.length() - 1) inputS.length() inputS.length inputS 1 2 i++ i++ i {
			first.add(slist.get(i));
	} {
			first.add(slist.get(i));
	} first.add(slist.get(i)) first.add first slist.get(i) slist.get slist i for(int i = (inputS.length() + 3) / 2 -1; i < inputS.length(); i ++) {
		second.add(slist.get(i));
	} int i = (inputS.length() + 3) / 2 -1; int i = (inputS.length() + 3) / 2 -1; i (inputS.length() + 3) / 2 -1 (inputS.length() + 3) / 2 (inputS.length() + 3) inputS.length() inputS.length inputS 3 2 1 i < inputS.length() i inputS.length() inputS.length inputS i ++ i ++ i {
		second.add(slist.get(i));
	} {
		second.add(slist.get(i));
	} second.add(slist.get(i)) second.add second slist.get(i) slist.get slist i String str1 = String.join("", first); str1 String.join("", first) String.join String "" first String str2 = String.join("", second); str2 String.join("", second) String.join String "" second if(isPalindrome(str1) && isPalindrome(str2) && isPalindrome(inputS)) {
		System.out.println("Yes");
	}else {
		System.out.println("No");
	} isPalindrome(str1) && isPalindrome(str2) && isPalindrome(inputS) isPalindrome(str1) && isPalindrome(str2) && isPalindrome(inputS) isPalindrome(str1) isPalindrome str1 isPalindrome(str2) isPalindrome str2 isPalindrome(inputS) isPalindrome inputS {
		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 static boolean isPalindrome(String sentence) {
    int minIdx = 0;
    int maxIdx = sentence.length() - 1;

    while(minIdx < maxIdx) {
        if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
            return false;
        }
    }
    return true;
} isPalindrome {
    int minIdx = 0;
    int maxIdx = sentence.length() - 1;

    while(minIdx < maxIdx) {
        if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
            return false;
        }
    }
    return true;
} int minIdx = 0; minIdx 0 int maxIdx = sentence.length() - 1; maxIdx sentence.length() - 1 sentence.length() sentence.length sentence 1 while(minIdx < maxIdx) {
        if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
            return false;
        }
    } minIdx < maxIdx minIdx maxIdx {
        if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
            return false;
        }
    } if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
            return false;
        } sentence.charAt(minIdx++) != sentence.charAt(maxIdx--) sentence.charAt(minIdx++) sentence.charAt sentence minIdx++ minIdx sentence.charAt(maxIdx--) sentence.charAt sentence maxIdx-- maxIdx {
            return false;
        } return false; false return true; true String sentence sentence public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	String inputS = sc.next();

	ArrayList<String>  slist = new ArrayList<>();
	ArrayList<String>  first = new ArrayList<>();
	ArrayList<String>  second = new ArrayList<>();

	for(int i = 0; i < inputS.length(); i++) {
		slist.add(inputS.substring(i, i+1));
	}

	for(int i = 0; i < (inputS.length() - 1) /2; i++) {
			first.add(slist.get(i));
	}

	for(int i = (inputS.length() + 3) / 2 -1; i < inputS.length(); i ++) {
		second.add(slist.get(i));
	}

	String str1 = String.join("", first);
	String str2 = String.join("", second);

	if(isPalindrome(str1) && isPalindrome(str2) && isPalindrome(inputS)) {
		System.out.println("Yes");
	}else {
		System.out.println("No");
	}

}

public static boolean isPalindrome(String sentence) {
    int minIdx = 0;
    int maxIdx = sentence.length() - 1;

    while(minIdx < maxIdx) {
        if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
            return false;
        }
    }
    return true;
}
} public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	String inputS = sc.next();

	ArrayList<String>  slist = new ArrayList<>();
	ArrayList<String>  first = new ArrayList<>();
	ArrayList<String>  second = new ArrayList<>();

	for(int i = 0; i < inputS.length(); i++) {
		slist.add(inputS.substring(i, i+1));
	}

	for(int i = 0; i < (inputS.length() - 1) /2; i++) {
			first.add(slist.get(i));
	}

	for(int i = (inputS.length() + 3) / 2 -1; i < inputS.length(); i ++) {
		second.add(slist.get(i));
	}

	String str1 = String.join("", first);
	String str2 = String.join("", second);

	if(isPalindrome(str1) && isPalindrome(str2) && isPalindrome(inputS)) {
		System.out.println("Yes");
	}else {
		System.out.println("No");
	}

}

public static boolean isPalindrome(String sentence) {
    int minIdx = 0;
    int maxIdx = sentence.length() - 1;

    while(minIdx < maxIdx) {
        if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
            return false;
        }
    }
    return true;
}
} Main
import java .util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	String inputS = sc.next();

	ArrayList<String>  slist = new ArrayList<>();
	ArrayList<String>  first = new ArrayList<>();
	ArrayList<String>  second = new ArrayList<>();

	for(int i = 0; i < inputS.length(); i++) {
		slist.add(inputS.substring(i, i+1));
	}

	for(int i = 0; i < (inputS.length() - 1) /2; i++) {
			first.add(slist.get(i));
	}

	for(int i = (inputS.length() + 3) / 2 -1; i < inputS.length(); i ++) {
		second.add(slist.get(i));
	}

	String str1 = String.join("", first);
	String str2 = String.join("", second);

	if(isPalindrome(str1) && isPalindrome(str2) && isPalindrome(inputS)) {
		System.out.println("Yes");
	}else {
		System.out.println("No");
	}

}

public static boolean isPalindrome(String sentence) {
    int minIdx = 0;
    int maxIdx = sentence.length() - 1;

    while(minIdx < maxIdx) {
        if(sentence.charAt(minIdx++) != sentence.charAt(maxIdx--)) {
            return false;
        }
    }
    return true;
}
}
