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