#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[20];
  while (cin >> a) {
    int ans = 0;
    int len = strlen(a);
    for (int i = 0; i < len / 2; i++) {
      if (a[i] != a[len - 1 - i]) ans++;
    }
    if (ans == 1 || len == 1 || ans == 0 && len % 2 != 0)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
