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