#include <bits/stdc++.h>
using namespace std;
const int N = 35;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  char s[N];
  gets(s);
  int cnt = 0;
  for (int i = 0; i < strlen(s); i++) {
    if (s[i] != s[strlen(s) - i - 1]) cnt++;
  }
  if (cnt == 2)
    cout << "YES" << endl;
  else {
    if (cnt == 0 && strlen(s) % 2)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
