n=int(input()) S=input() if n&1: print('No') elif S.count('(')!=S.count(')'): print('No') else: print('Yes')