#include <bits/stdc++.h>
using namespace std;
bool a[102][3];
int main() {
  ios_base::sync_with_stdio(0);
  string s;
  cin >> s;
  int n = s.length();
  for (int i = 0; i < n; i++) {
    if (s[i] != '.') {
      a[i][s[i] - 'A'] = true;
      if (i > 0) a[i - 1][s[i] - 'A'] = true;
      if (i < n) a[i + 1][s[i] - 'A'] = true;
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[i][0] && a[i][1] && a[i][2]) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
}
