T=int(input())
for i in range(T):
    n=int(input())
    m=list(map(int,input().split()))
    T=True
    m1=m
    m1.sort()
    m=m1[::-2]+m[::2]
    #print(m)
    for j in range(n-2):
        if (m[j]+m[j+2])<2*m[j+1]:
            T=False
    if T:
        print("YES")
    else:
        print("NO")
