#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int count = 0;
  string s;
  cin >> s;
  for (int i = 0, j = s.length() - 1; i < s.length() / 2; i++, j--)
    if (s[i] != s[j]) count++;
  cout << (count == 1                          ? "YES"
           : count == 0 && s.length() % 2 == 1 ? "YES"
                                               : "NO");
}
