#include <bits/stdc++.h>
using namespace std;
int n, m, p;
int main() {
  string s;
  cin >> s;
  int c = 0;
  for (int i = 0, j = s.size() - 1; i < j; i++, j--) {
    c += s[i] != s[j];
  }
  if (s.size() % 2 == 0 and c == 0) {
    cout << "NO";
    return 0;
  }
  cout << (c > 1 ? "NO" : "YES");
  return 0;
}
