def easy_way():
    n = int(input())
    str_digits = input().split()
    digits = []
    for digit in str_digits:
        digits.append(int(digit))
    digits.sort()
    digits.reverse()

    result = [0] * n

    for i in range(n//2):
        result[i] = digits[0]
        result[n-i-1] = digits[1]
        digits.pop(0)
        digits.pop(0)

    if n%2 != 0:
        result[n//2] = digits[0]

    return result

def check_array(digits):
    for i in range(1, len(digits)-1):
        if digits[i-1]+digits[i+1] < digits[i]*2:
                return False

results = []

n = int(input())
for _ in range(n):
    if (check_array(easy_way()) == False):
        results.append("NO")
    else:
        results.append("YES")

for result in results:
    print(result)