#include <bits/stdc++.h>
using namespace std;
int a[105][3];
int main() {
  string s;
  int n;
  cin >> s;
  n = s.size();
  for (int i = 0; i < n; i++) {
    if (s[i] != '.') a[i][s[i] - 'A'] = 1;
    if (i > 0 and s[i - 1] != '.') a[i][s[i - 1] - 'A'] = 1;
    if (i < n - 1 and s[i + 1] != '.') a[i][s[i + 1] - 'A'] = 1;
    int x = a[i][0] + a[i][1] + a[i][2];
    if (x == 3) {
      cout << "Yes\n";
      return 0;
    }
  }
  cout << "No\n";
}
