#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200008;
const long long inf = 1000000001;
const long long INF = 2e18;
const long double EPS = 1e-7;
const long long mod = inf + 6;
const int moff = 998244353;
const int mod13 = 1000003;
const long double PI = acos(-1.0);
signed main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  ;
  string s;
  cin >> s;
  int c = 0;
  for (int i = 0; i < s.size() / 2; ++i) {
    c += (s[i] != s[s.size() - i - 1]);
  }
  cout << (c == 1 || (c == 0 && s.size() % 2) ? "YES" : "NO");
}
