#C11502. Constant Pace Marathon

    ID: 40826 Type: Default 1000ms 256MiB

Constant Pace Marathon

Constant Pace Marathon

John participates in a marathon where he runs through multiple stages. For each stage, the time taken is recorded in minutes. Your task is to determine whether John maintained a constant pace during each test case; that is, he took the same amount of time for every stage.

For each test case, you will be given an integer N denoting the number of stages, followed by N integers representing the time for each stage. If all the stage times are equal, output "Yes"; otherwise, output "No".

Note: The input and output should be read from standard input (stdin) and written to standard output (stdout) respectively.

inputFormat

The first line of input contains an integer T representing the number of test cases. Each of the following T lines describes a test case:

  • Each test case begins with an integer N, the number of stages, followed by N space-separated integers, each representing the time (in minutes) taken to complete that stage.

outputFormat

For each test case, print a single line containing "Yes" if all the stage times are equal, or "No" otherwise.

## sample
3
3 10 10 10
4 8 8 9 8
2 6 7
Yes

No No

</p>