#include using namespace std; using ll = long long; using P = pair; #define fix(x) fixed << setprecision(x) #define asc(x) x, vector, greater #define rep(i, n) for(ll i = 0; i < n; i++) #define all(x) (x).begin(),(x).end() templatebool chmin(T&a, const T&b){if(a>b){a=b;return 1;}return 0;} templatebool chmax(T&a, const T&b){if(a se; bool f(ll x){ if(se.count(x)) return true; se.insert(x); return false; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; const ll b = 524287, MOD = 998244353; vector x(1e6); x[0] = b; rep(i,1e6-1) x[i+1] = x[i] * b % MOD; rep(i,n){ string s; cin >> s; bool ans = false; int m = s.size(); ll res = 0; rep(j,m) res = (res + s[j] * x[j]) % MOD; if(f(res)) ans = true; rep(j,n-1){ ll y = res - s[j] * x[j] - s[j+1] * x[j+1] + s[j] * x[j+1] + s[j+1] * x[j]; y = (y % MOD + MOD) % MOD; se.insert(y); } cout << (ans?"Yes\n":"No\n"); } return 0; }