#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int cnt = 0;
  string s;
  cin >> s;
  s = '#' + s;
  int n = s.length() - 1;
  for (int i = 1; i <= (n / 2); i++) {
    if (s[i] != s[n - i + 1]) {
      cnt++;
    }
  }
  if ((cnt <= 1 && (n & 1)) || cnt == 1)
    cout << "YES"
         << "\n";
  else
    cout << "NO"
         << "\n";
  return 0;
}
