#include<bits/stdc++.h>
using namespace std;
stack<char> s;
string cinema;
int f = 0;
int main()
{
cin >> cinema;
for(int i = 0; i < cinema.length(); i++)
{
if(cinema[i] == '(')
s.push(cinema[i]);
else if(s.empty() && cinema[i] == ')')
{
f = 1;
break;
}
else if(cinema[i] == '@')
break;
else if(!s.empty() && cinema[i] == ')')
s.pop();
}
if(f == 0)
cout << "yes";
else
cout << "no";
return 0;
}