N = int(input()) if N%2: print("No") exit() S = input() print("Yes" if S[0] == "(" and S[-1] == ")" and S.count("(") == N//2 else "No")