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