#include <bits/stdc++.h>
using namespace std;
string s;
int temp, i, j;
int main() {
  cin >> s;
  if (s.length() == 1) {
    cout << "YES" << endl;
    return 0;
  }
  for (i = 0, j = s.length() - 1; i <= s.length() / 2, j >= s.length() / 2;
       i++, j--) {
    if (s[i] != s[j]) {
      temp++;
    }
    if (i == j && temp == 0) {
      temp++;
    }
  }
  if (temp > 1 || temp == 0) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
}
