#include<bits/stdc++.h> //#include<windows.h> using namespace std; int main(){ int cds; char k; do{ cin>>k; if(k=='('){ cds++; }else{ if(k==')'){ cds--; } } if(k=='@'){ if(cds!=0){ cout<<"NO"; }else{ cout<<"YES"; } } }while(k!='@'); return 0; }