#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int main() {
  string s;
  cin >> s;
  int c = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != s[s.size() - 1 - i]) c++;
  }
  if (c == 0 && s.size() % 2 == 1)
    cout << "YES";
  else if (c == 2)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
