#include <bits/stdc++.h>
int main() {
  char s[16];
  scanf("%s", s);
  int i = 0, n, t = 0;
  n = strlen(s);
  while (s[i] != '\0') {
    if (s[i] != s[n - 1 - i]) t++;
    if (t > 2) break;
    i++;
  }
  if (t == 2 || (t == 0 && strlen(s) % 2 == 1))
    printf("YES");
  else
    printf("NO");
}
