#include int main() { char s[4]; scanf("%s",&s); s[0]==s[1]&&s[1]!=s[2]?puts("Yes"):puts("No"); }