#A. B - Same Name

    传统题 1000ms 256MiB

B - Same Name

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

B - Same Name

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:

NN

S1S_1 T1T_1

S2S_2 T2T_2

\hspace{0.6cm}\vdots

SNS_N TNT_N

Output

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


3
tanaka taro
sato hanako
tanaka taro
Yes

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


3
saito ichiro
saito jiro
saito saburo
No

No two persons have the same family and given names.


4
sypdgidop bkseq
bajsqz hh
ozjekw mcybmtt
qfeysvw dbo
No

2025寒假ATC码力训练营第六次练习

未参加
状态
已结束
规则
IOI
题目
5
开始于
2025-1-24 13:00
结束于
2025-1-24 14:30
持续时间
1.5 小时
主持人
参赛人数
6