#include <bits/stdc++.h>
using namespace std;
char s[111];
bool ch[3];
void solve() {
  scanf("%s", s);
  int len = strlen(s);
  for (int i = 1; i < len - 1; i++) {
    memset(ch, 0, sizeof(ch));
    for (int j = i - 1; j <= i + 1; j++) {
      if (s[j] == '.') continue;
      ch[s[j] - 'A'] = true;
    }
    if (ch[0] && ch[1] && ch[2]) {
      puts("Yes");
      return;
    }
  }
  puts("No");
}
int main(void) {
  solve();
  return 0;
}
