#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
string s;
int n;
int main() {
  cin >> s;
  n = s.length();
  for (int i = 1; i < n - 1; i++) {
    if (s[i - 1] == '.' || s[i] == '.' || s[i + 1] == '.') continue;
    int c1 = s[i - 1] - 'A' + 1;
    int c2 = s[i] - 'A' + 1;
    int c3 = s[i + 1] - 'A' + 1;
    int t = 0;
    if (c1 != c2 && c1 != c3) t++;
    if (c2 != c1 && c2 != c3) t++;
    if (c3 != c1 && c3 != c2) t++;
    if (t == 3) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  return 0;
}
