#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
void solve() {
  string s;
  cin >> s;
  for (long long i = 1; i + 1 < s.length(); i++) {
    if (s[i] != s[i - 1] && s[i] != s[i + 1] && s[i - 1] != s[i + 1] &&
        s[i - 1] != '.' && s[i + 1] != '.' && s[i] != '.') {
      cout << "YES\n";
      return;
    }
  }
  cout << "NO\n";
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
}
