#include <bits/stdc++.h>
using namespace std;
int len;
char cad[200];
int pos = 0;
queue<int> cola;
int x = 0;
int ID() {
  int i = pos;
  for (i = pos; i < len; i++) {
    if (!(isalnum(cad[i]) || cad[i] == '_')) break;
  }
  if (i == pos) {
    cola.push(1);
    return 0;
  }
  int dif = abs(pos - i);
  ;
  if (dif > 16) cola.push(1);
  pos = i;
  return dif;
}
bool MasId() {
  if (cad[pos] == '.') {
    pos++;
    x += ID() + 1;
    if (x > 32) cola.push(1);
    MasId();
  } else {
    return 0;
  }
}
bool jabber() {
  ID();
  if (cad[pos] != '@') {
    cola.push(1);
    return 0;
  }
  pos++;
  x += ID();
  if (cad[pos] == '.') MasId();
  if (pos == len) return 1;
  if (cad[pos] != '/') {
    cola.push(1);
    return 0;
  }
  pos++;
  ID();
  if (pos == len) return 1;
  cola.push(1);
  return 0;
}
int main() {
  scanf("%s", &cad);
  len = strlen(cad);
  jabber();
  if (cola.empty())
    cout << "YES";
  else {
    cout << "NO";
  }
  return 0;
}
