#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(ll i=0;i> N >> S; ll s=0; REP(i,N){ if(S[i]=='(') s++; else s--; if(s<0){ cout << "No" << endl; return 0; } } if(s==0) cout << "Yes" << endl; else cout << "No" << endl; return 0; }