#include <bits/stdc++.h>
using namespace std;
int main() {
  string inp;
  cin >> inp;
  int len = inp.length();
  int cnt = 0;
  bool flag = true;
  for (int i = 0; i < len / 2; ++i) {
    if (inp[i] != inp[len - i - 1]) {
      if (cnt == 1) {
        flag = false;
        break;
      }
      ++cnt;
    }
  }
  if (flag && (cnt == 1 || len % 2 == 1)) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
