import sys

n = int(sys.stdin.readline())

for i in range(n):
    large = int(sys.stdin.readline())
    array = list(map(int, sys.stdin.readline().split()))
    result = [0 for j in range(large)]
    right = large - 1
    left = 0

    maxNum1 = max(array)
    array.pop(array.index(maxNum1))
    maxNum2 = max(array)
    array.pop(array.index(maxNum2))
    result[right] = maxNum1
    result[left] = maxNum2
    left += 1
    right -= 1

    maxNum1 = max(array)
    array.pop(array.index(maxNum1))
    maxNum2 = max(array)
    array.pop(array.index(maxNum2))
    result[right] = maxNum1
    result[left] = maxNum2
    left += 1
    right -= 1

    enoughLeft = (result[left - 1] * 2) - result[left - 2]
    enoughRight = (result[right + 1] * 2) - result[right + 2]

    for j in range((large - 4) // 2):
        maxNum1 = max(array)
        array.pop(array.index(maxNum1))
        maxNum2 = max(array)
        array.pop(array.index(maxNum2))

        if enoughLeft > enoughRight:
            result[left] = maxNum1
            result[right] = maxNum2
        elif enoughLeft < enoughRight:
            result[left] = maxNum2
            result[right] = maxNum1
        else:
            if result[left - 1] > result[right + 1]:
                result[left] = maxNum1
                result[right] = maxNum2
            else:
                result[left] = maxNum2
                result[right] = maxNum1

        left += 1
        right -= 1

        if ((large - 4) // 2) - 1 != j:
            enoughLeft = (result[left - 1] * 2) - result[left - 2]
            enoughRight = (result[right + 1] * 2) - result[right + 2]
    
    if large % 2 == 1:
        result[int(large / 2)] = array[0]

    allFine = True
    for j in range(1, large - 1):
        if result[j] * 2 > result[j - 1] + result[j + 1]:
            allFine = False
            break
    if allFine: print("YES")
    else: print("NO")