#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void swap(long long *f, long long *s) {
  long long temp = *f;
  *f = *s;
  *s = temp;
}
void solve() {
  string a;
  cin >> a;
  int flag = 0;
  for (int i = 1; i < a.length() - 1; i++) {
    if (a[i] != a[i - 1] && a[i] != a[i + 1] && a[i] != '.' &&
        a[i - 1] != '.' && a[i + 1] != '.' && a[i - 1] != a[i + 1]) {
      flag = 1;
    }
  }
  if (flag)
    cout << "Yes";
  else
    cout << "No";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
}
