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