#include <bits/stdc++.h>
using namespace std;
double sqr(double x) { return x * x; }
int const N = (int)2e6 + 1, INF = (int)1e9 + 1, MOD = (int)1e9 + 7;
long long mypow(long long a, long long b, long long mod) {
  long long rv = 1;
  while (b) {
    if (b % 2) rv = rv * a % mod;
    a = a * a % mod;
    b /= 2;
  }
  return rv;
}
bool ok, used[N], same;
long long n, m, k, cur, ans, p, cnt, pos, q;
string second, t;
long long b;
long long a[N];
vector<long long> v;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> second;
  if (second.size() < 3) cout << "NO", exit(0);
  for (int i = 0; i < second.size() - 2; i++) {
    if (second[i] != second[i + 1] && second[i] != second[i + 2] &&
        second[i + 1] != second[i + 2] && second[i] != '.' &&
        second[i + 1] != '.' && second[i + 2] != '.')
      cout << "YES", exit(0);
  }
  cout << "NO";
  return 0;
}
