#include<bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    int t;
    cin>>t;
    while(t--)
    {
        cin>>s;int d=0;
        if(s.length()%2||s[0]==')'||s[s.size()-1]=='(')
            cout<<"NO\n";
        else
        cout<<"YES\n";
    }
    return 0;
}