/* ∧∧∩ ( ゚∀゚)/ キタ━━━━━━(゚∀゚)━━━━━━!!!! ⊂ ノ ゆっくり見てってね!!!!!!!! (つ ノ o (ノ \ ☆ | o (⌒ ⌒ヽ / ☆ \ (´⌒ ⌒ ⌒ヾ / ('⌒ ; ⌒ ::⌒ ) (´ ) ::: ) / ☆─ (´⌒;: ::⌒`) :; ) */ #include <bits/stdc++.h> using namespace std; #define rep(i, s, n) for (int i = (s); i < (int)(n); i++) typedef long long ll; #define _GLIBCXX_DEBUG int main() { ios::sync_with_stdio(false); std::cin.tie(nullptr); string s; cin >>s; if(s[0] == s[1] && s[0] != s[2]) cout << "Yes" << endl; else cout << "No" << endl; }