n = int(input()) s = input() if s.count("(") == s.count(")"): print("Yes") else: print("No")