#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int m;
int n;
long long ans;
int nint() {
  int x;
  scanf("%d", &x);
  return x;
}
int main() {
  string s;
  cin >> s;
  int n = ((int)(s).size());
  int c = 0;
  for (int i = 0; i < (n); i++)
    if (s[i] != s[n - i - 1]) c++;
  if (c > 2 || (c == 0 && n % 2 == 0))
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
