N = int(input()) if N%2: print("No") exit() print("Yes" if input().count("(") == N//2 else "No")