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