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:


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */





import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import static java.lang.System.in;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import static java.util.Collections.list;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;
import java.util.function.Function;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
import java.util.stream.Stream;
import javax.xml.stream.events.Characters;
import sun.security.util.Length;





/**
 *
 * @author george
 */
public class main {
public static boolean isPrime(long n) {
    if(n < 2) return false;
    if(n == 2 || n == 3) return true;
    if(n%2 == 0 || n%3 == 0) return false;
    long sqrtN = (long)Math.sqrt(n)+1;
    for(long i = 6L; i <= sqrtN; i += 6) {
        if(n%(i-1) == 0 || n%(i+1) == 0) return false;
    }
    return true;
}

    private static long f(long l) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

public static boolean contains(final int[] arr, final int key) {
    return Arrays.stream(arr).anyMatch(i -> i == key);
}
 static boolean isSubSequence(String str1, String str2, int m, int n)
    {
       
        if (m == 0) 
            return true;
        if (n == 0) 
            return false;
             
        
        if (str1.charAt(m-1) == str2.charAt(n-1))
            return isSubSequence(str1, str2, m-1, n-1);
 
        
        return isSubSequence(str1, str2, m, n-1);
    }

    static int gcdThing(int a, int b) {
    BigInteger b1 = BigInteger.valueOf(a);
    BigInteger b2 = BigInteger.valueOf(b);
    BigInteger gcd = b1.gcd(b2);
    return gcd.intValue();
}
    public static boolean checkAnagram(String str1, String str2) {
        int i=0;
        for (char c : str1.toCharArray()) {
        i = str2.indexOf(c, i) + 1;
        if (i <= 0) { return false; }
    }
    return true;

}
    
    public static Set primeFactors(int num)
    {
        Set<Integer>Prime=new HashSet<Integer>();
        // Print the number of 2s that divide n
        int tw=2;
        while (num%2==0)
        {
            Prime.add(tw);
            num /= 2;
        }
 
        // n must be odd at this point.  So we can
        // skip one element (Note i = i +2)
        for (int i = 3; i <= Math.sqrt(num); i+= 2)
        {
            // While i divides n, print i and divide n
            while (num%i == 0)
            {
                Prime.add(i);
                num/= i;
            }
        }
 
        // This condition is to handle the case whien
        // n is a prime number greater than 2
        if (num> 2)
            Prime.add(num);        
        return Prime;
    }
    public static String Winner(int [] arr)
    {
        int maxsum=-1;
        int temp=0;
        List<Integer> L=Arrays.stream(arr).boxed().collect(Collectors.toList());
        int count=0;
        String winner="First";
        while(L.isEmpty()!=true){
           if(count%2==0){winner="First";
           //take max odd interval
            for (int i = 0; i < L.size(); i++) {
                
            }
            }
           else{winner="Second";
           
           
           
           
           
           
           
           }
           count++;
        }
    
    
    return winner;
    }
    public static String changeCharInPosition(int position, char ch, String str){
    char[] charArray = str.toCharArray();
    charArray[position] = ch;
    return new String(charArray);
    }
    public static boolean CheckCanObtainYfromX(String y,String x){
        boolean cond=true;
        String help="";
        for (int i = 0; i < y.length(); i++) {
            help="";help+=y.charAt(i);
            if(y.contains(help)==false){x=x.replaceFirst(help,"A");cond=false;break;}
            
        }
        return cond;
    }
   public static int LongestPalindrome(String x){
    int n=x.length();
    boolean table[][] = new boolean[n][n];
    int maxLength = 1;
     for (int i = 0; i < n; ++i)
            table[i][i] = true;
   int start = 0;
    for (int i = 0; i < n - 1; ++i) {
            if (x.charAt(i) == x.charAt(i + 1)) {
                table[i][i + 1] = true;
                start = i;
                maxLength = 2;
            }
        }
     for (int k = 3; k <= n; ++k) {
            for (int i = 0; i < n - k + 1; ++i) 
            {
                int j = i + k - 1;
               if (table[i + 1][j - 1] && x.charAt(i) == x.charAt(j)) {
                    table[i][j] = true;
                if (k > maxLength) {
                        start = i;
                        maxLength = k;
                    }
                }
            }
     }
   return maxLength;
   }
   public static long choose(long total, long choose){
    if(total < choose)
        return 0;
    if(choose == 0 || choose == total)
        return 1;
    return choose(total-1,choose-1)+choose(total-1,choose);
}
    public static long bitwiseAdd(int n1, int n2) {
        int x = n1, y = n2;
        int xor, and, temp;
        and = x & y;
        xor = x ^ y;

        while (and != 0) {
            and <<= 1;
            temp = xor ^ and;
            and &= xor;
            xor = temp;
        }
        return (xor%2);
    }
   public static void mex(int [] xx){
   
   
   
   
   
   
   
   }

    public static void main (String []  args) throws IOException 
    {
        Scanner s=new Scanner(System.in);
        String x=s.next();
        int diff=0;
        for (int i = 0; i < x.length()/2; i++) {
            if(x.charAt(i)!=x.charAt(x.length()-(i+1))){diff++;}
        }
        
        if(x.length()%2!=0&&diff==0){
            System.out.print("YES");System.exit(0);
        }
        if(diff==1){ System.out.print("YES");System.exit(0);}
        System.out.print("NO");
      }  
   }