#include <bits/stdc++.h>
using namespace std;
int len, tot = 0, d = 0;
bool e = 0;
char a, b[100];
int main() {
  scanf("%c", &a);
  while (isdigit(a) || isalpha(a) || a == '_') {
    tot++;
    scanf("%c", &a);
  }
  if (tot > 16 || !tot || a != '@') {
    puts("NO");
    return 0;
  }
  tot = 0;
  scanf("%s", b);
  len = strlen(b);
  for (int i = 0; i < len; ++i) {
    if (b[i] == '/') {
      if (e || d > 32 || d < 1 || tot < 1 || tot > 16) {
        puts("NO");
        return 0;
      }
      e = 1;
      tot = 0;
      continue;
    }
    d++;
    if (b[i] == '.') {
      if (tot < 1 || tot > 16) {
        puts("NO");
        return 0;
      }
      tot = 0;
      continue;
    }
    if (!isdigit(b[i]) && !isalpha(b[i]) && b[i] != '_') {
      puts("NO");
      return 0;
    }
    tot++;
  }
  if (tot < 1 || tot > 16) {
    puts("NO");
    return 0;
  }
  puts("YES");
}
