#include<bits/stdc++.h>
using namespace std;
#define debug(a) cout << #a << "=" << a << ' '<<endl;
#define ll int64_t


void solve()
{
	  string s;
	  cin>>s;
	  
	  int n=s.length();
	  
	  if(n&1)
	  {
	  	 cout<<"NO"<<endl;
	  	 return;
	  }
	  
	  
	  if(s[0]==')' or  s[n-1]=='(')
	  {
	  	 cout<<"NO"<<endl;
	  	 return;
	  }
	  
	  cout<<"YES"<<endl;
	  
}

int main()
{ 
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
  
  int t;
  cin>>t;
  while(t--)
  {
  	 solve();
  } 
}