import sys
t = int(sys.stdin.readline())

def isGood(a):
    global n
    for x in range(1,n-1):
        if a[x]*2>a[x-1]+a[x+1]:
            return False
    return True


for _ in range(t):
    n=int(sys.stdin.readline())
    a=list(map(int,sys.stdin.readline().split()))

    newline=[0]*n

    a.sort()

    if n==3:
        a[1],a[2]=[a[2],a[1]]
        if a[1]*2<=a[0]+a[1]:
            print('YES')
        else:
            print('NO')
    else:
        newline[0]=a.pop()
        newline[-1]=a.pop()
        newline[1]=a.pop()
        newline[-2]=a.pop()      

        pointer=2
        while len(a)!=0:
            need1=newline[pointer-1]*2-newline[pointer-2]
            need2=newline[n-pointer]*2-newline[n-(pointer-1)]
            if need1>=need2:
                newline[pointer]=a.pop()
                if len(a)!=0:
                    newline[-(pointer+1)]=a.pop()
            else:
                newline[-(pointer+1)]=a.pop()
                if len(a)!=0:
                    newline[pointer]=a.pop()
            pointer+=1
        
        if isGood(newline):
            print('YES')
        else:
            print("NO")
            #print(newline)

