#include using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; template using vc = vector; template using vvc = vc>; using pi = pair; using pl = pair; using vi = vc; using vvi = vvc; using vl = vc; using vvl = vvc; #define rep(i,a,b) for (int i = (int)(a); i < (int)(b); i++) #define irep(i,a,b) for (int i = (int)(a); i > (int)(b); i--) #define all(a) a.begin(),a.end() #define print(n) cout << n << '\n' #define pritn(n) print(n) #define printv(n,a) {copy(all(n),ostream_iterator(cout," ")); cout<<"\n";} #define printvv(n,a) {for(auto itr:n) printv(itr,a);} #define rup(a,b) (a+b-1)/b #define input(A,N) rep(i,0,N) cin>>A[i] #define chmax(a,b) a = max(a,b) #define chmin(a,b) a = min(a,b) const ll m2 = 1000000007; const ll b2 = 1009; const ll m3 = 1000000009; const ll b3 = 2009; const ll m4 = 2147483587; const ll b4 = 2147483583; //https://gist.github.com/privet-kitty/295ac9202b7abb3039b493f8238bf40f#file-modulus-random-base-pair64-txt struct rhash{ int n; ll mod,B; vc sum; vc powb; string s; rhash(string &s,ll mod,ll B):mod(mod),B(B),s(s){ n = s.size(); sum = vc(n+1,0); powb = vc(n+1,1); for(int i = 0;i>n; // unordered_set d; set d; rep(i,0,n){ string now; cin>>now; rhash hash(now,m2,b2); bool p =false; if(d.find(hash.get(0,now.size()))!=d.end()) p = true; rep(i,0,now.size()-1){ ll nn = hash.inv(i); if(d.find(nn)!=d.end())p = true; if(p) break; } d.insert(hash.get(0,now.size())); if(p) print("Yes"); else print("No"); } //system("pause"); return 0; }