Jellyfish and its dream
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

Jellyfish can only long drift throughout their lives as if they have no thoughts of their own. But you know, how we know that jellyfish really have no dreams, right?  — S4M, Jellyfish
You are given a 0-indexed array a of length n where .

You can perform the operation below:
  • Choose an index i such that , then let .

Jellyfish's dream is to make all elements equal. Check if its dream could be achieved after performing some (possibly zero) operations.

输入描述:

Each test contains multiple test cases. The first line contains the number of test cases T (). Description of the test cases follows.

The first line contains a single integer n ().

The second line contains n integers ().

It is guaranteed that the sum of n over all test cases does not exceed .

输出描述:

For each test case, output one line. If all element can be equal after some (possibly zero) operations, print "Yes", otherwise print "No".

You can print letters in any case (upper or lower).
示例1

输入

复制
5
2
1 0
3
0 2 1
4
0 1 2 2
5
0 2 1 0 1
6
2 0 2 1 0 1

输出

复制
Yes
No
Yes
No
Yes