#include <bits/stdc++.h>
char a[20];
char b[20];
int main() {
  scanf("%s", a);
  int x = strlen(a), count = 0;
  ;
  for (int i = 0; i < x; i++) {
    b[i] = a[x - i - 1];
  }
  for (int i = 0; i < x / 2; i++) {
    if (a[i] != b[i]) count++;
  }
  if (count == 1)
    printf("YES");
  else if (count == 0) {
    if (x % 2 == 1)
      printf("YES");
    else
      printf("NO");
  } else {
    printf("NO");
  }
  return 0;
}
