← Home
package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	reader := bufio.NewReader(os.Stdin)
	var t int
	fmt.Fscan(reader, &t)

	primes := []int64{2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47}

	for i := 0; i < t; i++ {
		var n int
		fmt.Fscan(reader, &n)
		a := make([]int64, n)
		seen := make(map[int64]bool)
		hasDup := false
		for j := 0; j < n; j++ {
			fmt.Fscan(reader, &a[j])
			if seen[a[j]] {
				hasDup = true
			}
			seen[a[j]] = true
		}

		if hasDup {
			fmt.Println("NO")
			continue
		}

		possible := true
		for _, p := range primes {
			if p > int64(n/2) {
				break
			}
			counts := make([]int, p)
			for _, val := range a {
				counts[val%p]++
			}
			allTwo := true
			for _, c := range counts {
				if c < 2 {
					allTwo = false
					break
				}
			}
			if allTwo {
				possible = false
				break
			}
		}

		if possible {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}