#include <bits/stdc++.h>
using namespace std;
long long mx = -1e18;
long long mn = 1e18;
long long M = 1e9 + 7;
long long mod(long long x) { return ((x % M + M) % M); }
void solve() {
  string s, d;
  cin >> s;
  long long x = s.length() - 1;
  long long y = 0;
  for (long long i = 0; i <= x; i++) {
    if (s[i] != s[x]) y++;
    x--;
  }
  if (y == 1)
    cout << "YES\n";
  else if (y == 0 && s.length() % 2 == 1)
    cout << "YES\n";
  else
    cout << "NO\n";
}
int main() { solve(); }
