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