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