import sys

t = int(sys.stdin.readline())
for i in range(t):
    q = int(sys.stdin.readline())
    m = list(map(int,sys.stdin.readline().split()))
    m = sorted(m)
    """
    m1 = []
    m2 = []
    for i in range(q):
        if i%2 == 0:
            m2.append(m[i])
        else:
            m1.append(m[i])
        
    m1 = list(reversed(m1))
    m = m1 + m2
    print(m)
    wiin = 0
    for i in range(q-2):
        if 2*m[i+1] <= m[i] + m[i+2]:
            wiin += 1
        else:
            print("NO")
            break
    if wiin == q-2:
        print("YES")
    print(sorted(m))
    """
    m = list(reversed(m))
    tt = []
    i = 0
    print(m)
    while i <= q-2:
        print(i,q,len(m))
        if 2*m[i+1] <= m[i] + m[i+2]:
            i+=1
            if len(m) == i+2:
                break
        else:
            tt.append(m[i+1])
            q -= 1
            m.pop(i+1)
            if len(m) == i+2:
                break

    tt = list(reversed(tt))
    m += tt
    wiin = 0
    q += len(tt)
    print(m)
    for i in range(q-2):
        if 2*m[i+1] <= m[i] + m[i+2]:
            wiin += 1
        else:
            print("NO")
            break
    if wiin == q-3:
        print("YES")
