#include <bits/stdc++.h>
using namespace std;
long long n, m, a[1000010], b = 0, k;
int main() {
  string s;
  cin >> s;
  long long l = s.length();
  for (long long i = 1; i < l - 1; i++) {
    if (s[i] == '.' || s[i - 1] == '.' || s[i + 1] == '.') continue;
    if (s[i] == s[i - 1] || s[i] == s[i + 1] || s[i - 1] == s[i + 1])
      continue;
    else {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
}
