Problem: Mike has a string s consisting of only lowercase English letters. He wants to change exactly one character from the string so that the resulting one is a palindrome. 

A palindrome is a string that reads the same backward as forward, for example strings "z", "aaa", "aba", "abccba" are palindromes, but strings "codeforces", "reality", "ab" are not.

Input

The first and single line contains string s (1 ≤ |s| ≤ 15).

Output

Print "YES" (without quotes) if Mike can change exactly one character so that the resulting string is palindrome or "NO" (without quotes) otherwise. 

Examples

Input

abccaa


Output

YES


Input

abbcca


Output

NO


Input

abcda


Output

YES

Solution (in JAVA):

Solution:
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String word = sc.next();
        int d = word.length()/2;
        int counter = 0;
        for (int i = 0; i <d ; i++) {
            if(word.charAt(i) != word.charAt(word.length()-(i+1))) {
                counter++;
            }
            if(counter>1) break;


        }

        if(counter==1 ) System.out.print("YES");
        else if (counter==0 && word.length()%2!=0) System.out.print("YES");
        else System.out.print("NO");
        //System.out.print(counter);



    }


    private static long getChoicesOfThree(long n) {


        return n * (n - 1) * (n - 2) / 6;
    }


    //algos


    public static boolean check(int size, long[][] matrix) {
        int up, down;
        for (int i = 0; i < (size + 1) >> 1; i++)
            for (int j = 0; j < size; j++) {
                up = size - 1 - i;
                down = size - 1 - j;
                if (matrix[up][down] != matrix[i][j])
                    return false;
            }

        return true;
    }

    public static int lowerBound(ArrayList<Integer> array, int low, int length, long value) {

        int high = length;
        while (low < high) {
            final int mid = (low + high) / 2;
            if (value <= array.get(mid)) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }
        return low;
    }

    public static int lowerBound(int[] array, int low, int length, long value) {

        int high = length;
        while (low < high) {
            final int mid = (low + high) / 2;
            if (value <= array[mid]) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }
        return low;
    }


    private static int binarySearch(long i, int begin, long[] a) {


        int mid = 0;

        int end = a.length - 1;

        while (begin <= end) {

            mid = (begin + end) / 2;

            if (a[mid] < i) {
                begin = mid + 1;

            } else if (a[mid] > i) {
                end = mid - 1;

            } else return mid + 1;


        }


        return -1;
    }

    private static int binarySearch(long i, int begin, ArrayList<Integer> a) {


        int mid;

        int end = a.size() - 1;

        while (begin <= end) {

            mid = (begin + end) / 2;

            if (a.get(mid) < i) {
                begin = mid + 1;

            } else if (a.get(mid) > i) {
                end = mid - 1;

            } else return mid + 1;


        }


        return -1;
    }


    public static int upperBound(long[] array, int low, int length, long value) {

        int high = length;
        while (low < high) {
            final int mid = (low + high) / 2;
            if (value >= array[mid]) {
                low = mid + 1;
            } else {
                high = mid;
            }
        }
        return low;
    }

    public static int upperBound(ArrayList<Integer> array, int low, int length, long value) {

        int high = length;
        while (low < high) {
            final int mid = (low + high) / 2;
            if (value >= array.get(mid)) {
                low = mid + 1;
            } else {
                high = mid;
            }
        }
        return low;
    }


    public static boolean isContain(String a, char b) {


        for (int i = 0; i < a.length(); i++) {

            if (a.charAt(i) == b) return true;


        }


        return false;
    }


}





            /*

                Scanner sc = new Scanner(System.in);
                int n = sc.nextInt();
                int[] x = new int[n];

                    for (int i = 0; i < n; i++) {
                    x[i] = sc.nextInt();
                    }
                    Arrays.sort(x);

                    int q = sc.nextInt();
                    int[] m = new int[q];

                    for (int i = 0; i < q; i++) {
                    m[i] = sc.nextInt();
                    int index = binaryS(x, 0, x.length, m[i]);

                    // Arrays.binarySearch();
                    System.out.println(index + 1);

                    }


                    }

            private static int binaryS(int[] x, int i, int length, int m) {

                    int begin = 0;
                    int last = x.length - 1;
                    int mid = 0;
                    while (begin <= last)// a5r lafa lma el begin y3de el last . s3etha hayo2f
                    {
                    mid = (begin + last) / 2;
                    if (x[mid] < m) begin = mid + 1;
                    else if (x[mid] > m) last = mid - 1;
                    else return mid + 1;


                    }

                    return mid;*/


//TODO : queries more or less
    /*

            Scanner sc = new Scanner(System.in);
            int an = sc.nextInt();
            int bn = sc.nextInt();
            int [] a = new int [an];
            int [] b = new int [bn];

            for (int i = 0; i <an ; i++) {
                a[i]=sc.nextInt();
            }


            Arrays.sort(a);


            for (int i = 0; i <bn ; i++) {
                b[i]=sc.nextInt();
            }


            for (int i = 0; i < bn; i++) {
                System.out.print(upperBound(a,a.length,b[i])+" ");
            }
    *//* private static void recurseAb(int rem, int a, int b, int counter) {
        counter++;

        if (rem % a == 0 && rem / a > counterGlobe) {
            counterGlobe = counter + (rem / a) - 1;
            return;

        } else {
            while (rem > 10 * b) {
                rem = rem - a;
                counter++;
            }
            if (rem - a > a) {

                recurseAb(rem - a, a, b, counter);
            } else if (rem - a == 0 && counter > counterGlobe) {
                counterGlobe = counter;
                //System.out.print(counter);
                return;

            }

            if (rem - b > b) {


                recurseAb(rem - b, a, b, counter);
            } else if (rem - b == 0 && counter > counterGlobe) {
                counterGlobe = counter;
                //  System.out.println(counter);
                return;
            }
        }


    }*/