def query(s):
k = 2
l = len(s)
s = " " + s
for i in range(1, l//2 + 1):
if s[i] != s[l-i+1]:
if not k:
return False
k -= 1
return True
def main():
import sys
input = sys.stdin.read
data = input().split()
for s in data:
if query(s):
print("YES")
else:
print("NO")
if __name__ == "__main__":
main()
ZGVmIHF1ZXJ5KHMpOgogICAgayA9IDIKICAgIGwgPSBsZW4ocykKICAgIHMgPSAiICIgKyBzCiAgICAKICAgIGZvciBpIGluIHJhbmdlKDEsIGwvLzIgKyAxKToKICAgICAgICBpZiBzW2ldICE9IHNbbC1pKzFdOgogICAgICAgICAgICBpZiBub3QgazoKICAgICAgICAgICAgICAgIHJldHVybiBGYWxzZQogICAgICAgICAgICBrIC09IDEKICAgIHJldHVybiBUcnVlCgpkZWYgbWFpbigpOgogICAgaW1wb3J0IHN5cwogICAgaW5wdXQgPSBzeXMuc3RkaW4ucmVhZAogICAgZGF0YSA9IGlucHV0KCkuc3BsaXQoKQogICAgCiAgICBmb3IgcyBpbiBkYXRhOgogICAgICAgIGlmIHF1ZXJ5KHMpOgogICAgICAgICAgICBwcmludCgiWUVTIikKICAgICAgICBlbHNlOgogICAgICAgICAgICBwcmludCgiTk8iKQoKaWYgX19uYW1lX18gPT0gIl9fbWFpbl9fIjoKICAgIG1haW4oKQo=