#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
long long gcd(long long a, long long b) { return a == 0 ? b : gcd(b % a, a); }
string s;
int main() {
  cin >> s;
  if (s.find("ABC") == -1 && s.find("ACB") == -1 && s.find("BCA") == -1 &&
      s.find("BAC") == -1 && s.find("CAB") == -1 && s.find("CBA") == -1) {
    printf("No\n");
  } else
    printf("Yes\n");
}
