P10837 [HackerEarth] gcd 5
普及
题目描述

In this problem you will be given an integer array A of size N, your task is find whether given array is sorted or not (in ascending order) , if print "YES" else print "NO".

Array a[n] is sorted if a[0] ≤ a[1] ≤ ... a[n - 1].

Input

First line of input contains contains integer T denoting number of test cases.
For each test case T, first line of input contains number N denoting size of array A and second line contains N space seperated integers denoting elements of array A.

Output

Print "YES" or "NO" as explained above.

Constraints

1 ≤ T ≤ 10

1 ≤ N ≤ 100,000

1 ≤ A[i] ≤ 10,00,00,00,000

SAMPLE INPUT
3
4
1 2 3 4
3
7 66 10
2
1 0

SAMPLE OUTPUT
YES
NO
NO

输入格式

见题面

输出格式

见题面

样例输入
3 4 1 2 3 4 3 7 66 10 2 1 0 SAMPLE
样例输出
YES NO NO