T96987进不了讨论区,求调QwQ
#include<bits/stdc++.h>
using namespace std;
string c;
stack<char> s;
int main(){
cin>>c;
int num=0;
while(1){
if(c[num]=='@')
break;
else if(c[num]=='('||c[num]=='['||c[num]=='{')
s.push(c[num]);
else if((!s.empty()&&s.top()=='('&&c[num]==')')||(!s.empty()&&s.top()=='['&&c[num]==']')||(!s.empty()&&s.top()=='{'&&c[num]=='}'));
s.pop();
num++;
}
if(s.empty())
cout<<"YES";
else
cout<<"NO";
return 0;
}