// Arup Guha
// 3/25/2022
// Solution to Codeforces D2 Round 774 Problem B: Quality vs Quantity
// Used for COP 3503 Exam #2 Question 4
import java.util.*;
import java.io.*;

public class b_alt2 {

	public static void main(String[] args) throws Exception {
	
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		int nC = Integer.parseInt(stdin.readLine());
		Random rnd = new Random();
		
		// Go through the cases.
		for (int loop=0; loop<nC; loop++) {
		
			// Read input.
			int n = Integer.parseInt(stdin.readLine());
			long[] list = new long[n];
			StringTokenizer tok = new StringTokenizer(stdin.readLine());
			for (int i=0; i<n; i++)
				list[i] = Long.parseLong(tok.nextToken());
			
			// To randomize array before sort.
			for (int i=0; i<3*n; i++) {
				int x = rnd.nextInt(n);
				int y = rnd.nextInt(n);
				long tmp = list[x];
				list[x] = list[y];
				list[y] = tmp;
			}
			
			// Output accordingly.
			if (canSplit(list)) 	
				System.out.println("YES");
			else		
				System.out.println("NO");
		
		}
	}
	
	// Alternate Method for exam
	public static boolean canSplit(long[] a) {

		// Sort the array.
		Arrays.sort(a);
		
		// Sum smallest (n+1)/2 values for set T.
		long leftS = 0;
		for (int i=0; i<(a.length+1)/2; i++)
			leftS += a[i];
			
		// Sum largest (n+1)/2-1 values for S.
		long rightS = 0;
		for (int i=a.length/2+1; i<a.length; i++)
			rightS += a[i];
			
		// Ta da!
		return rightS > leftS;
	}
}