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