#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[100];
  cin >> s;
  int numDif = 0;
  int len = strlen(s);
  for (int i = 0; i < len / 2; i++)
    if (s[i] != s[len - i - 1]) numDif++;
  if (len % 2 != 0 && numDif == 0) numDif++;
  if (numDif == 1)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
