n = int(input()) s = list(input().rstrip()) print('Yes' if s[0] == '(' and s.count('(') == s.count(')') else 'No')