#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[17];
  cin >> str;
  int l, cnt = 0;
  l = strlen(str);
  for (int i = 0, j = l - 1; i < l / 2; i++, j--) {
    if (str[i] != str[j]) {
      cnt++;
    }
  }
  if (cnt == 1)
    cout << "YES" << endl;
  else if (l & 1 && cnt == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
