import sys
t = int(sys.stdin.readline())
for _ in range(t):
    n = int(sys.stdin.readline())
    a=[int(i) for i in sys.stdin.readline().split()]
    a.sort()
    b=[0]*n
    i=0
    d=0
    while i<n and a:
        k=0
        if i%2==0:
            b[i//2]=a.pop(-1)
            if i>3:
                while 2*b[i//2-1]>b[i//2-2]+b[i//2]:
                    try:
                        c=b[n-i+1+k]
                        b[n-i+1+k]=b[i//2]
                        b[i//2]=c
                        k+=1
                    except:
                        break
                    
        else:
            b[n-1-i//2]=a.pop(-1)
            if i>4:
                while 2*b[n-i//2]>b[n-1-i//2]+b[n+1-i//2]:
                    try:
                        c=b[i//2-k]
                        b[i//2-k]=b[n-1-i//2]
                        b[n-1-i//2]=c
                        k+=1
                    except:
                        break
        i+=1
    for i in range(1,n-1):
        if b[i-1]+b[i+1]<2*b[i]:
            d=1
            break
    if d==1:
        print("NO")
    else:
        print("YES")
    

