#include <bits/stdc++.h>
char str[1000];
int judge(char c) {
  if (isalnum(c)) return 1;
  if (c == '_') return 1;
  return 0;
}
int main() {
  int i;
  while (gets(str)) {
    int a = 0;
    int len = strlen(str);
    int num = 0, t = 1;
    for (i = 0; i < len; i++) {
      if (str[i] == '@' || str[i] == '/' || str[i] == '.') {
        if (num > 16 || num <= 0 || i == len - 1) {
          t = 0;
          break;
        }
        num = 0;
        if (a == 0 && str[i] != '@') {
          t = 0;
          break;
        }
        if (a == 2 && str[i] != '/') {
          t = 0;
          break;
        }
        if (str[i] == '@') {
          a = 1;
        }
        if (str[i] == '/') {
          a = 2;
        }
      } else if (judge(str[i]))
        num++;
      else {
        t = 0;
        break;
      }
    }
    if (a && t)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
