#include <bits/stdc++.h>
using namespace std;
char s[300];
bool check(char a, char b, char c) {
  bool fr[4];
  for (int i = 0; i < 4; ++i) fr[i] = 0;
  fr[a - 'A']++;
  fr[b - 'A']++;
  fr[c - 'A']++;
  for (int i = 0; i < 3; ++i)
    if (!fr[i]) return 0;
  return 1;
}
int main() {
  cin >> s;
  int n = strlen(s);
  bool ok = 0;
  for (int i = 1; i < n - 1; ++i)
    if (check(s[i], s[i - 1], s[i + 1])) ok = 1;
  if (ok)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
