#include <bits/stdc++.h>
using namespace std;
char str[105];
int N, arr[105];
int main() {
  scanf("%s%n", str, &N);
  for (int i = 0; i < N; i++) {
    if (str[i] == '.')
      arr[i] = 0;
    else
      arr[i] = 1 << (str[i] - 'A');
  }
  for (int i = 1; i < N - 1; i++) {
    if ((arr[i - 1] | arr[i] | arr[i + 1]) == 7) {
      printf("Yes\n");
      return 0;
    }
  }
  printf("No\n");
}
