#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, s1, s2;
  cin >> s;
  int i, j, c = 0, k;
  if (s.size() % 2 == 0) {
    s1 = s.substr(0, s.size() / 2);
    s2 = s.substr(s.size() / 2, s.size() / 2);
    for (i = 0; i < s1.size(); i++) {
      if (s1[i] != s2[s2.size() - 1 - i]) c++;
    }
  } else {
    k = (s.size() - 1) / 2;
    s1 = s.substr(0, k);
    s2 = s.substr(k + 1, k);
    for (i = 0; i < s1.size(); i++) {
      if (s1[i] != s2[s2.size() - 1 - i]) c++;
    }
  }
  if (c == 0) {
    if (s.size() % 2 == 0)
      cout << "NO";
    else
      cout << "YES";
  } else if (c == 1)
    cout << "YES";
  else
    cout << "NO";
}
