#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e7 + 10;
const int INF = 0x3f3f3f3f;
const double EPS = 1e-10;
inline int read() {
  int ret = 0, f = 0;
  char ch = getchar();
  while (ch > '9' || ch < '0') f ^= ch == '-', ch = getchar();
  while (ch <= '9' && ch >= '0') ret = ret * 10 + ch - '0', ch = getchar();
  return f ? -ret : ret;
}
string s;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  int len = s.length();
  for (int i = 1; i < len - 1; i++) {
    if (s[i] != s[i - 1] && s[i] != s[i + 1] && s[i] != '.' &&
        s[i + 1] != '.' && s[i - 1] != '.' && s[i + 1] != s[i - 1]) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
