n=int(input()) s=input() if s.count('(')*2==n: print('Yes') else: print('No')