#include<cstdio>
#include<cstring>
using namespace std;
char s[300];
inline bool judge(char &ch){
return (ch>=‘A‘&&ch<=‘Z‘)||(ch>=‘a‘&&ch<=‘z‘)||(ch>=‘0‘&&ch<=‘9‘)||(ch==‘_‘);
}
int main(){
scanf("%s",s);
int len=strlen(s);
int ai=0;int flag=0;
for(int i=0;i<len;i++) if(s[i]==‘@‘){ai=i;break;}
if(!ai){puts("no");return 0;}
for(int i=0;i<ai;i++) if(!judge(s[i])){puts("no");return 0;}
if(!judge(s[ai+1])){puts("no");return 0;}
for(int i=ai+2;i<len;i++) if(s[i]==‘.‘){
flag=1;
if(!judge(s[i+1])){puts("no");return 0;}
}
if(!flag){puts("no");return 0;}
puts("yes");
return 0;
}