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:
//package codeforces.c_410_2;

import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.StringTokenizer;

public class A implements Runnable{

    // solution
    void solve() throws IOException {
        while (true) {
            String str = readString();
            if(str == null){
                break;
            }
            int cnt = 0;
            for (int i = 0; i <= str.length() / 2; i++) {
                String rep = replaceCharAt(str, i, str.charAt(str.length() - i - 1));
                if (str.charAt(i) != str.charAt(str.length() - i - 1)) {
                    if (isPalindrome(rep)){
                        cnt = 1;
                        break;
                    }
                }else if(str.length() % 2 != 0 && i == str.length() / 2){
                    if (isPalindrome(rep)){
                        cnt = 1;
                        break;
                    }
                }
            }

            if (cnt == 1) {
                println("YES");
            } else {
                println("NO");
            }
        }
    }

    boolean isPalindrome(String str){
        for (int i = 0; i < str.length() / 2; i++) {
            //println(str.charAt(i) + " " + str.charAt(str.length() - i - 1));
            if (str.charAt(i) != str.charAt(str.length() - i - 1)) {
                return false;
            }
        }
        return true;
    }

    String replaceCharAt(String str, int i, char c) {
        if(i<0 || i>=str.length())
            return null;
        String x = "";
        if(str.length()==1)
            return x += c;
        if(i==0) {
            return c + str.substring(1, str.length());
        }
        else if(i==str.length()-1) {
            return str.substring(0, i) + c;
        }
        else {
            return str.substring(0, i) + c + str.substring(i + 1, str.length());
        }
    }










    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {
        new Thread(null, new A(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            long t1 = 0, t2 = 0;
            if (System.getProperty("ONLINE_JUDGE") != null) {
                t1 =  System.currentTimeMillis();
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("src/codeforces/input.txt"));
                out = new PrintWriter("src/codeforces/output.txt");
            }
            Locale.setDefault(Locale.US);
            solve();
            in.close();
            out.close();
            if(System.getProperty("ONLINE_JUDGE") != null){
                t2 = System.currentTimeMillis();
                System.err.println("Time = " + (t2 - t1));
            }
        } catch (Throwable t) {
            t.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    String readString() throws IOException {
        try {
            while (!tok.hasMoreTokens()) {
                tok = new StringTokenizer(in.readLine());
            }
            return tok.nextToken();
        }catch (NullPointerException npe){
            return null;
        }

    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    void println(Object line){
        out.println(line);
    }

    void print(Object line){
        out.print(line);
    }

}