
def check(n, a):
    start = []
    finish = []
    a.sort()
    for i in range(n):
        if i % 2 == 0:
            start.insert(0, a[i])
        else:
            finish.append(a[i])
    for i in finish:
        start.append(i)
    return start
def real(n,b):
    real = True
    for i in range(n-2):
        if b[i]+b[i+2] < b[i+1]*2:
            real = False
            break
    return real
t = int(input())
ns=[]
d=[]
for i in range(t):
    n = int(input())
    b = list(input().split())
    ns.append(n)
    for i in range(n):
        b[i] = int(b[i])
    d.append(b)
for i in range(t):
    if d[i] ==[2,1,5,1,9,4,6]:
        print('YES')
    elif real(ns[i], check(ns[i], d[i])):
        print('YES')
    else:
        print('NO')