#include <bits/stdc++.h>
int isAlpha(char x) { return x >= 'A' && x <= 'Z' || x >= 'a' && x <= 'z'; }
int isDigit(char x) { return x >= '0' && x <= '9'; }
int main(void) {
  char a[100];
  int flag = 0, i;
  scanf("%[^@]", a);
  for (i = 0; a[i]; i++)
    if (isAlpha(a[i]) || isDigit(a[i]) || a[i] == '_')
      ;
    else
      flag = 1;
  if (!a[i] && i >= 1 && i <= 16)
    ;
  else {
    flag = 1;
  }
  if (scanf("@%[^/\n\r]", a) == 0) {
    flag = 1;
  }
  int c = 0;
  for (i = 0; a[i]; i++)
    if (isAlpha(a[i]) || isDigit(a[i]) || a[i] == '_') {
      flag |= (++c > 16);
    } else if (a[i] == '.') {
      flag |= (c == 0);
      c = 0;
    } else
      flag = 1;
  if (c == 0) flag = 1;
  if (i >= 1 && i <= 32)
    ;
  else
    flag = 1;
  gets(a);
  if (a[0] == '/') {
    for (i = 1; a[i]; i++)
      if (isAlpha(a[i]) || isDigit(a[i]) || a[i] == '_')
        ;
      else
        flag = 1;
    if (i >= 2 && i <= 17)
      ;
    else
      flag = 1;
  }
  puts(flag ? "NO" : "YES");
  return 0;
}
