#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 100;
map<long long, long long> ma, mb;
pair<long long, long long> p[N];
bool b[N];
vector<int> v[N], v1;
set<long long> s;
int main() {
  string s;
  cin >> s;
  if (s.size() < 3) {
    cout << "NO";
    return 0;
  }
  for (int i = 0; i < s.size() - 2; i++) {
    if (s[i] != s[i + 1] && s[i] != s[i + 2] && s[i + 1] != s[i + 2] &&
        s[i] != '.' && s[i + 1] != '.' && s[i + 2] != '.')
      return cout << "YES", 0;
  }
  cout << "NO";
  return 0;
}
