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 PYTHON3):

Solution:

def failed():
    print('NO')
    exit()

def passed():
    print('YES')
    exit()


word = input()
word = list(word)
ulta = list(word)
ulta.reverse()
n = len(word)
# print(ulta)
# print(word)


if(n==0):
    failed()
if(n==2):
    if(word[0] == word[1]):
        failed()
    else:
        passed()

count = 0
for i in range(len(word)//2):
    if(word[i]!= ulta[i]):
        count += 1

if(n%2 != 0):
    # odd
    # means there is always 1 way to do
    if(count < 2):
        passed()
    else:
        failed()
else:
    # even
    if(count == 1):
        passed()
    else:
        failed()

# if(n%2 != 0):
#     # odd
#     if(0 < count < 2):
#         passed()
#     else:
#         failed()
# else:
#     # even
#     if(count == 1):
#         passed()
#     else:
#         failed()



# complex way
# n = len(word)

# if(n==0):
#     failed()
# # if(n==2):
# #     if(word[0] == word[1]):
# #         passed()
# #     else:
# #         failed()


# lim = n//2

# if(lim%2 != 0):
#     lim+=1

# # count of wrong pair on each side
# off_nums = 0

# for i in range(lim):
#     # print('comparing: ',word[i] ,' and ' , word[-(1+i)] )
#     if(word[i] != word[-(1+i)]):
#         off_nums +=1
#     if(off_nums == 2):
#         failed()
    
# passed()