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

void main ()
{
	auto tests = readln.strip.to !(int);
	foreach (test; 0..tests)
	{
		auto a = readln.splitter.map !(to !(int)).array;
		auto n = a[0] - 2;
		a = a[1..$];
		bool ok = false;
		foreach (i; 0..16)
		{
			auto corners = 4.iota.map !(k => (i >> k) & 1).array;
			auto b = a.dup;
			foreach (k; 0..4)
			{
				b[k] -= corners[k];
				b[(k + 1) & 3] -= corners[k];
			}
			ok |= b.all !(v => 0 <= v && v <= n);
		}
		writeln (ok ? "YES" : "NO");
	}
}
