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

bool solve (string s)
{
	if (s.length % 2 != 0)
	{
		return false;
	}
	if (s.front == ')' || s.back == '(')
	{
		return false;
	}
	return true;
}

void main ()
{
	auto tests = readln.strip.to !(int);
	foreach (test; 0..tests)
	{
		auto s = readln.strip;
		writeln (solve (s) ? "Yes" : "No");
	}
}
