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=[a[3],a[1],a[0],a[2]]
    n-=1
    d=1
    if 2*a[1]<=a[3]+a[0] and 2*a[0]<=a[1]+a[2]:
        d=0
    if d==0:
        print("YES")
    else:
        print("NO")
        
    
