# include <bits/stdc++.h>
using namespace std;
int main(void)
{
string s;
cin>>s;
s = '#' + s;
int n = s.length() - 1;
int cnt = 0;
for (int i = 1;i + i <= n;++i)
if (s[i] != s[n - i + 1])
++cnt;
if ((cnt <= 1 && (n&1)) || cnt == 1) puts("YES");
else puts("NO");
return 0;
}
IyBpbmNsdWRlIDxiaXRzL3N0ZGMrKy5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbih2b2lkKQp7CiAgICBzdHJpbmcgczsKICAgIGNpbj4+czsKICAgIHMgPSAnIycgKyBzOwogICAgaW50IG4gPSBzLmxlbmd0aCgpIC0gMTsKICAgIGludCBjbnQgPSAwOwogICAgZm9yIChpbnQgaSA9IDE7aSArIGkgPD0gbjsrK2kpCiAgICAgICAgaWYgKHNbaV0gIT0gc1tuIC0gaSArIDFdKQogICAgICAgICAgICArK2NudDsKICAgIGlmICgoY250IDw9IDEgJiYgKG4mMSkpIHx8IGNudCA9PSAxKSBwdXRzKCJZRVMiKTsKICAgIGVsc2UgcHV0cygiTk8iKTsKICAgIHJldHVybiAwOwp9Cg==