#abc307b. [abc307_b]racecar

[abc307_b]racecar

Problem Statement

You are given NN strings S1,S2,ldots,SNS_1,S_2,\\ldots,S_N consisting of lowercase English letters.
Determine if there are distinct integers ii and jj between 11 and NN, inclusive, such that the concatenation of SiS_i and SjS_j in this order is a palindrome.

A string TT of length MM is a palindrome if and only if the ii-th character and the (M+1i)(M+1-i)-th character of TT are the same for every 1leqileqM1\\leq i\\leq M.

Constraints

  • 2leqNleq1002\\leq N\\leq 100
  • 1leqlvertSirvertleq501\\leq \\lvert S_i\\rvert \\leq 50
  • NN is an integer.
  • SiS_i is a string consisting of lowercase English letters.
  • All SiS_i are distinct.

Input

The input is given from Standard Input in the following format:

NN S1S_1 S2S_2 vdots\\vdots SNS_N

Output

If there are ii and jj that satisfy the condition in the problem statement, print Yes; otherwise, print No.


Sample Input 1

5
ab
ccef
da
a
fe

Sample Output 1

Yes

If we take (i,j)=(1,4)(i,j)=(1,4), the concatenation of S1=S_1=ab and S4=S_4=a in this order is aba, which is a palindrome, satisfying the condition.
Thus, print Yes.

Here, we can also take (i,j)=(5,2)(i,j)=(5,2), for which the concatenation of S5=S_5=fe and S2=S_2=ccef in this order is feccef, satisfying the condition.


Sample Input 2

3
a
b
aba

Sample Output 2

No

No two distinct strings among S1S_1, S2S_2, and S3S_3 form a palindrome when concatenated. Thus, print No.
Note that the ii and jj in the statement must be distinct.


Sample Input 3

2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Sample Output 3

Yes