100 atcoder#ABC216B. [ABC216B] Same Name
[ABC216B] Same Name
Score : points
Problem Statement
There are people. The family name and given name of the -th person are and , 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 such that , , and .
Constraints
- is an integer.
- Each of and is a string of length between and (inclusive) consisting of English lowercase letters.
Input
Input is given from Standard Input in the following format:
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