#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[15];
  scanf("%s", &s);
  int c = 0;
  int len = strlen(s);
  if (len == 1) {
    printf("YES");
    return 0;
  }
  for (int i = 0; i <= len - i - 1; i++) {
    if (s[i] != s[len - i - 1]) {
      c++;
    }
  }
  if ((c == 1) || (c == 0 && len % 2 == 1))
    printf("YES");
  else
    printf("NO");
  return 0;
}
