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