#include #include using namespace std; static inline constexpr string solve(const string& S) noexcept { if (S[0] == S[1] && S[1] != S[2]) return "Yes"s; else return "No"s; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); string S; S.reserve(3); cin >> S; cout << solve(S) << '\n'; return 0; }