import sys
input=lambda:sys.stdin.readline().rstrip()
def solve():
N=int(input())
S=list(input())
S=[i==')' for i in S[::-1]]
print(['Yes','No'][0 in S and S.index(0)<N//2+1])
T=int(input())
for i in range(T):
solve()
Partitioning binary strings | Special sets |
Smallest chosen word | Going to office |
Color the boxes | Missing numbers |
Maximum sum | 13 Reasons Why |
Friend's Relationship | Health of a person |
Divisibility | A. Movement |
Numbers in a matrix | Sequences |
Split houses | Divisible |
Three primes | Coprimes |
Cost of balloons | One String No Trouble |
Help Jarvis! | Lift queries |
Goki and his breakup | Ali and Helping innocent people |
Book of Potion making | Duration |
Birthday Party | e-maze-in |
Bricks Game | Char Sum |