import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.string;

bool solve (int n, int [] a)
{
	n = min (n, 30);
	a = a[0..n];
remove_loop:
	while (!a.empty)
	{
		foreach_reverse (i; 0..n)
		{
			if (a[i] % (i + 2) != 0)
			{
				a = a[0..i] ~ a[i + 1..$];
				n -= 1;
				continue remove_loop;
			}
		}
		return false;
	}
	return true;
}

void main ()
{
	auto tests = readln.strip.to !(int);
	foreach (test; 0..tests)
	{
		auto n = readln.strip.to !(int);
		auto a = readln.splitter.map !(to !(int)).array;
		writeln (solve (n, a) ? "YES" : "NO");
	}
}
