#include <bits/stdc++.h>
using namespace std;
bool isValid(char c) { return (isalnum(c) || c == '_'); }
int main() {
  char acc[105];
  memset(acc, 0, sizeof(acc));
  scanf("%s", acc);
  int Pjg = strlen(acc);
  int PjgKata = 0;
  bool bisa = true;
  int pos;
  for (pos = 0; pos < Pjg && bisa && acc[pos] != '@' && PjgKata <= 16; pos++) {
    if (isValid(acc[pos]))
      PjgKata++;
    else
      bisa = false;
  }
  if (PjgKata < 0 || pos == Pjg || acc[pos] != '@')
    bisa = false;
  else
    pos++;
  int Total = 0;
  PjgKata = 0;
  for (; pos < Pjg && bisa && acc[pos] != '/' && PjgKata <= 16 && Total <= 32;
       pos++) {
    if (isValid(acc[pos]))
      PjgKata++;
    else if (acc[pos] == '.') {
      if (PjgKata == 0) bisa = false;
      PjgKata = 0;
    } else
      bisa = false;
    if (bisa) Total++;
  }
  if (PjgKata < 1 || Total < 1)
    bisa = false;
  else
    pos++;
  PjgKata = 0;
  for (; pos < Pjg && bisa && PjgKata <= 16; pos++) {
    if (isValid(acc[pos]))
      PjgKata++;
    else
      bisa = false;
  }
  if (acc[Pjg - 1] == '/') bisa = false;
  if (bisa)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
