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