For god's sake, you're boxes with legs! It is literally your only purpose! Walking onto buttons! How can you not do the one thing you were designed for?

Oh, that's funny, is it? Oh it's funny? Because we've been at this for twelve hours and you haven't solved it either, so I don't know why you're laughing. You've got one hour! Solve it!  

Wheatley decided to try to make a test chamber. He made a nice test chamber, but there was only one detail absent — cubes.

For completing the chamber Wheatley needs $n$ cubes. $i$-th cube has a volume $a_i$.

Wheatley has to place cubes in such a way that they would be sorted in a non-decreasing order by their volume. Formally, for each $i>1$, $a_{i-1} \le a_i$ must hold.

To achieve his goal, Wheatley can exchange two neighbouring cubes. It means that for any $i>1$ you can exchange cubes on positions $i-1$ and $i$.

But there is a problem: Wheatley is very impatient. If Wheatley needs more than $\frac{n \cdot (n-1)}{2}-1$ exchange operations, he won't do this boring work.

Wheatly wants to know: can cubes be sorted under this conditions?


-----Input-----

Each test contains multiple test cases.

The first line contains one positive integer $t$ ($1 \le t \le 1000$), denoting the number of test cases. Description of the test cases follows.

The first line of each test case contains one positive integer $n$ ($2 \le n \le 5 \cdot 10^4$) — number of cubes.

The second line contains $n$ positive integers $a_i$ ($1 \le a_i \le 10^9$) — volumes of cubes.

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


-----Output-----

For each test case, print a word in a single line: "YES" (without quotation marks) if the cubes can be sorted and "NO" (without quotation marks) otherwise.


-----Example-----
Input
3
5
5 3 2 1 4
6
2 2 2 2 2 2
2
2 1

Output
YES
YES
NO



-----Note-----

In the first test case it is possible to sort all the cubes in $7$ exchanges.

In the second test case the cubes are already sorted.

In the third test case we can make $0$ exchanges, but the cubes are not sorted yet, so the answer is "NO".

Difficulty: interview

Starter code:

Solutions:
input=__import__('sys').stdin.readline
for _ in range(int(input())):
	n=int(input())
	s=list(map(int,input().split()))
	print('YNEOS'[sum(a>b for a,b in zip(s,s[1:]))==n-1::2])


t = int(input())

for _ in range(t):
    n = int(input())
    
    a = list(map(int, input().split()))
    
    if all(x > y for x, y in zip(a, a[1:])):
        print("NO")
    else:
        print("YES")
        


import sys
input = sys.stdin.readline

def main():
    n = int(input())
    alst = list(map(int, input().split()))
    bef = alst[0]
    for a in alst[1:]:
        if a >= bef:
            print("YES")
            return
        bef = a
    print("NO")
    
for _ in range(int(input())):
    main()

# In the long run, we only hit what we aim at. Henry David Thoreau
# by : Blue Edge - Create some chaos

for _ in range(int(input())):
    n=int(input())
    a=list(map(int,input().split()))
    if a==sorted(a)[::-1] and len(set(a))==n:
        print("NO")
    else:
        print("YES")


t = int(input())
for _ in range(t):
    n=int(input())
    a=list(map(int, input().split()))
    f=False
    for i in range(n-1):
        if a[i]<=a[i+1]:
            f=True
    if f:
        print('YES')
    else:
        print('NO')

T = int(input())
for case in range(T):
    n = int(input())
    a = list(map(int,input().split()))
    flag = 1
    for i in range(n-1):
        if a[i]<=a[i+1]:
            flag=0
            break
    if flag:print("NO")
    else:print("YES")

#   ==========     //\\       //||     ||====//||
#       ||        //  \\        ||     ||   // ||
#       ||       //====\\       ||     ||  //  ||
#       ||      //      \\      ||     || //   ||
#   ========== //        \\  ========  ||//====|| 
#  code

def solve():
    n = int(input())
    a = list(map(int, input().split()))

    b = a[:]
    b.sort()
    b = b[::-1]
    c = set(a)
    if a == b:
        if len(c) == len(a):
            print('NO')
        else:
            print('YES')
    else:
        print('YES')
    return

def main():
    t = 1
    t = int(input())
    for _ in range(t):
        solve()

def __starting_point():
    main()
__starting_point()

import sys
input = sys.stdin.readline
for nt in range(int(input())):
	n = int(input())
	a = list(map(int,input().split()))
	if len(set(a))==n and a==sorted(a)[::-1]:
		print ("NO")
	else:
		print ("YES")

t=int(input())
while t>0 :
    n=int(input())
    l=list(map(int,input().split()))
    f=0 
    for i in range(1,n) :
        if l[i]>=l[i-1] :
            f=1 
            break
    if (f==0) :
        print("NO")
    else :
        print("YES")
    t-=1


from sys import stdin

tt = int(stdin.readline())

for loop in range(tt):

    n = int(stdin.readline())
    a = list(map(int,stdin.readline().split()))

    ans = "NO"

    for i in range(n-1):
        if a[i] <= a[i+1]:
            ans = "YES"
            break

    print (ans)

import sys
input = lambda: sys.stdin.readline().rstrip()

T = int(input())
for _ in range(T):
    N = int(input())
    A = [int(a) for a in input().split()]
    for i in range(N - 1):
        if A[i] <= A[i+1]:
            print("YES")
            break
    else:
        print("NO")



import sys
input = sys.stdin.readline

t=int(input())

for tests in range(t):
    n=int(input())
    A=list(map(int,input().split()))

    for i in range(1,n):
        if A[i-1]>A[i]:
            continue
        else:
            print("YES")
            break
    else:
        print("NO")


from math import *
from bisect import *
from collections import *
from random import *
from decimal import *
import sys
input=sys.stdin.readline
def inp():
    return int(input())
def st():
    return input().rstrip('\n')
def lis():
    return list(map(int,input().split()))
def ma():
    return list(map(int,input().split()))
t=int(input())
while(t):
    t-=1
    n=inp()
    a=lis()
    fl=0
    for i in range(n-1):
        if(a[i]>a[i+1]):
            fl+=1
            continue
    if(fl==n-1):
        print("NO")
    else:
        print("YES")
    
    


t=int(input())
for _ in range(t):
	n=int(input())
	arr=list(map(int,input().split()))
	s=set(arr)
	arr2=arr.copy()
	arr2.sort(reverse=True)
	if(len(s)==n and arr2==arr):
		print("NO")
	else:
		print("YES")

t=int(input())
for you in range(t):
    n=int(input())
    l=input().split()
    li=[int(i) for i in l]
    poss=1
    for i in range(n-1):
        if(li[i]>li[i+1]):
            continue
        poss=0
        break
    if(poss):
        print("NO")
    else:
        print("YES")