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

    mustCont = False
    
    for i in range(2):
        if len(array) == 1:
            mustCont = True
            result[1] = 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")
            break
        else:
            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
    
    if mustCont: continue

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

    mustCont = False

    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

        if result[left - 1] * 2 > result[left] + result[left - 2]:
            mustCont = True
            break
        if result[right + 1] * 2 > result[right] + result[right + 2]:
            mustCont = True
            break

        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 mustCont: 
        print("NO")
        continue
    
    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")