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