#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using ll = unsigned long long; using Graph = vector>; int main() { string s; cin >> s; bool yes = 1; char hitomozi = s.at(0); if (!(s.at(1) == hitomozi)) { yes = 0; } if (s.at(2) == hitomozi) { yes = 0; } if (yes) { cout << "Yes" << endl; } else { cout << "No" << endl; } }