#include <bits/stdc++.h>
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 50;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
using namespace std;
void solve() {
  string s;
  cin >> s;
  int n = s.size();
  for (int i = (int)0; i < (int)n; ++i) {
    for (int j = i; j < n; ++j) {
      string str = "";
      for (int k = (int)0; k < (int)j - i + 1; ++k) str.push_back(s[i + k]);
      if (str == s) {
        cout << "YES\n";
        return;
      }
    }
  }
  cout << "NO\n";
}
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  solve();
  return 0;
}
