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