#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  string s1("ABC"), s2("ACB"), s3("BAC"), s4("BCA"), s5("CAB"), s6("CBA");
  int state = 0;
  if (s.find(s1) != -1)
    state = 1;
  else if (s.find(s2) != -1)
    state = 1;
  else if (s.find(s3) != -1)
    state = 1;
  else if (s.find(s4) != -1)
    state = 1;
  else if (s.find(s5) != -1)
    state = 1;
  else if (s.find(s6) != -1)
    state = 1;
  else
    state = 0;
  if (state == 0)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
  return 0;
}
