#include <bits/stdc++.h>
using namespace std;
const double pi = 3.14159265359;
long long apowb(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b % 2 == 0) ans = (ans * a) % 1000000007;
    a = (a * a) % 1000000007;
    b = b / 2;
  }
  return ans;
}
long long sub(long long a, long long b) {
  long long ans = (a - b) % 1000000007;
  if (ans < 0) return ans + 1000000007;
  return ans;
}
long long mul(long long a, long long b) {
  long long ans = (a * b);
  if (ans >= 1000000007) return ans % 1000000007;
  return ans;
}
long long sum(long long a, long long b) {
  long long ans = a + b;
  if (ans >= 1000000007) return ans % 1000000007;
  return ans;
}
void solve() {
  string s;
  cin >> s;
  int n = s.length();
  if (n <= 2) {
    cout << "NO" << endl;
    return;
  }
  for (int i = 2; i < n; i++) {
    if (s[i] != s[i - 1] && s[i - 1] != s[i - 2] && s[i] != s[i - 2]) {
      if (s[i] != '.' && s[i - 1] != '.' && s[i - 2] != '.') {
        cout << "YES" << endl;
        return;
      }
    }
  }
  cout << "NO" << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) solve();
  return 0;
}
