|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||512 MB||45||24||18||56.250%|
Professor Snape has just marked the final exam papers and wants to know if the distribution of grades is satisfactory or not. He first sorted all papers by their grades and then took the best and worst marks and took their average. Let’s call his number A. Then he took the average of all the grades. Let this number be called B. If and only if the absolute difference between A and B is less than 1, he considers the distribution to be satisfactory.
Write a program to help professor Snape.
The first line contains the number of test cases T.
Each test case consists of two lines, the first line is a single integer, n ≤ 50000, the number of students and the second line has n space separated non-negative integers smaller than 101, the grades students received.
For each test case print “Yes” (without quotations) if the distribution is satisfactory and “No” (without quotations) otherwise.
2 3 1 2 3 3 1 10 100