#include <bits/stdc++.h>
int main() {
  char kata[16], kata1[16], kata2[16];
  scanf("%[^\n]", kata);
  getchar();
  strcpy(kata1, kata);
  int len = strlen(kata) - 1;
  int count = 0;
  for (int i = 0; i <= len; i++) {
    if (kata1[i] != kata1[len - i]) count++;
  }
  if (count == 2)
    printf("YES\n");
  else {
    if (count == 0 && (len + 1) % 2)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
