#include <bits/stdc++.h>
using namespace std;
const int Maxn = 105;
int len;
char stp[Maxn];
int vis[Maxn];
int main() {
  scanf("%s", stp);
  len = strlen(stp);
  for (int i = 1; i < len - 1; i++) {
    if (stp[i] != '.') vis[stp[i] - 'A'] = 1;
    if (stp[i - 1] != '.') vis[stp[i - 1] - 'A'] = 1;
    if (stp[i + 1] != '.') vis[stp[i + 1] - 'A'] = 1;
    if (vis[0] == 1 && vis[1] == 1 && vis[2] == 1) {
      cout << "Yes" << endl;
      return 0;
    }
    vis[0] = 0, vis[1] = 0, vis[2] = 0;
  }
  cout << "No" << endl;
  return 0;
}
