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