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