for i in range(int(input())):
    n=int(input())
    a=sorted(list(map(int,input().split())))
    a[n-1],a[n-2]=a[n-2],a[n-1]
    ans='YES'
    for i in range(n-2):
        if(a[i]*2>a[i-1]+a[i+1]):
            a[0],a[i]=a[i],a[0]
            #print(a,i)
            break
    for i in range(n-2):
        if(a[i]*2>a[i-1]+a[i+1]):
            ans='NO'
            #print(a,i)
            break
    print(ans)