Tom has lots of skyscrapers in his LEGO city, some buildings are very tall while some are too short. Tom doesn't like that, he wants equality for all buildings as it becomes difficult to maintain the really tall ones and the short ones are easily ignored.
Tom is too lazy to work and has given you the job, the chief architect of the city!
The buildings are placed in a straight line, side-by-side. You have to level all the buildings by removing 1 block at a time from the top of a taller building and placing them on any adjacent shorter building.
Tom wants to know if it is possible to achieve total equality, that is, all buildings of the same height.
For each test case, print a single line which is either "Yes" (Without Quotes) or "No" (Without Quotes).
1 <= T <= 10
1 <= N <= \(10^5\)
0 <= Ai <= \(10^9\)