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