from collections import Counter input() c = Counter(input()) print("Yes" if c["("] == c[")"] else "No")