#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main() {
  int i, j;
  string s;
  cin >> s;
  string a = "ABC", b = "ACB", c = "BAC", d = "BCA", e = "CAB", f = "CBA";
  int aa = s.find(a);
  int bb = s.find(b);
  int cc = s.find(c);
  int dd = s.find(d);
  int ee = s.find(e);
  int ff = s.find(f);
  if (aa != -1 || bb != -1 || cc != -1 || dd != -1 || ee != -1 || ff != -1) {
    cout << "yes";
  } else
    cout << "no";
}
