Contest Duration: - (local time) (100 minutes) Back to Home
B - Same Name /

Time Limit: 2 sec / Memory Limit: 1024 MB

問題文

N 人の人がいます。i \, (1 \leq i \leq N) 人目の人の姓は S_i、名は T_i です。

制約

• 2 \leq N \leq 1000
• N は整数
• S_i,T_i は英小文字のみからなる長さ 1 以上 10 以下の文字列

入力

N
S_1 T_1
S_2 T_2
\hspace{0.6cm}\vdots
S_N T_N


入力例 1

3
tanaka taro
sato hanako
tanaka taro


出力例 1

Yes


1 人目の人と 3 人目の人が同姓同名です。

入力例 2

3
saito ichiro
saito jiro
saito saburo


出力例 2

No


入力例 3

4
sypdgidop bkseq
bajsqz hh
ozjekw mcybmtt
qfeysvw dbo


出力例 3

No


Score : 200 points

Problem Statement

There are N people. The family name and given name of the i-th person (1 \leq i \leq N) are S_i and T_i, respectively.

Determine whether there is a pair of people with the same family and given names. In other words, determine whether there is a pair of integers (i,j) such that 1 \leq i \lt j \leq N, S_i=S_j, and T_i=T_j.

Constraints

• 2 \leq N \leq 1000
• N is an integer.
• Each of S_i and T_i is a string of length between 1 and 10 (inclusive) consisting of English lowercase letters.

Input

Input is given from Standard Input in the following format:

N
S_1 T_1
S_2 T_2
\hspace{0.6cm}\vdots
S_N T_N


Output

If there is a pair of people with the same family and given names, print Yes; otherwise, print No.

Sample Input 1

3
tanaka taro
sato hanako
tanaka taro


Sample Output 1

Yes


The first and third persons have the same family and given names.

Sample Input 2

3
saito ichiro
saito jiro
saito saburo


Sample Output 2

No


No two persons have the same family and given names.

Sample Input 3

4
sypdgidop bkseq
bajsqz hh
ozjekw mcybmtt
qfeysvw dbo


Sample Output 3

No