#C717. Bird Returns to a Previously Visited Checkpoint

    ID: 51011 Type: Default 1000ms 256MiB

Bird Returns to a Previously Visited Checkpoint

Bird Returns to a Previously Visited Checkpoint

In this problem, you are given a series of checkpoints represented by their Cartesian coordinates. The bird visits these checkpoints in order. Your task is to determine whether the bird ever revisits a checkpoint that it has already visited.

Input Format: The first line contains an integer ( n ) representing the number of checkpoints. Each of the next ( n ) lines contains two space-separated integers ( x ) and ( y ) denoting the coordinates of a checkpoint.

Output Format: Output a single line with the string "Yes" if there exists at least one checkpoint that the bird visits more than once, and "No" otherwise.

For example, if the checkpoints are: ( (1,2), (3,4), (5,6), (1,2), (7,8) ), the bird revisits ( (1,2) ) and the output should be "Yes".

inputFormat

The input is read from standard input (stdin). The first line contains a single integer ( n ) (( 1 \leq n \leq 10^5 )), which is the number of checkpoints. Each of the following ( n ) lines contains two integers separated by a space representing the ( x ) and ( y ) coordinates of a checkpoint.

outputFormat

The output is written to standard output (stdout) and is a single line: "Yes" if the bird returns to a previously visited checkpoint, or "No" if it does not.## sample

5
1 2
3 4
5 6
1 2
7 8
Yes