#include using namespace std; #define rep(i,n) for(int i=0; i; using TU = tuple; using vint = vector; using vvint = vector; using vvvint = vector; using vll = vector; using vvll = vector; using vvvll = vector; template istream &operator>>(istream &is,vector &v){for(T &in:v){is>>in;}return is;} template ostream &operator<<(ostream &os,vector &v){for(int i=0;i<(int)v.size();i++){os< istream &operator>>(istream &is,vector> &v){for(vector &in:v){is>>in;}return is;} template ostream &operator<<(ostream &os,vector> &v){for(vector &out:v){os<>s; set st; for(auto c:s){ st.insert(c); } if(st.size()!=2) { cout << "No" << '\n'; return 0; } if(s[0]==s[1]) cout << "Yes" << '\n'; else cout << "No" << '\n'; return 0; }