#include <bits/stdc++.h>
using namespace std;
bool is(char c, char k) { return (c == k); }
int main() {
  string s;
  cin >> s;
  if (s.size() < 3) return cout << "No\n", 0;
  for (int i = 0; i < s.size() - 2; ++i) {
    bool A = false, B = false, C = false;
    for (int j = 0; j < 3; ++j) {
      A |= is(s[i + j], 'A');
      B |= is(s[i + j], 'B');
      C |= is(s[i + j], 'C');
    }
    if (A && B && C) return cout << "Yes\n", 0;
  }
  cout << "No\n";
}
