#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n;
int m;
char w[200];
int main() {
  gets(w);
  int n = strlen(w);
  int x = -1, y = n;
  for (int i = 0; i < n; i++)
    if (w[i] == '@')
      x = i;
    else if (w[i] == '/')
      y = i;
  if (x == -1 || x == 0 || x > 16)
    printf("NO\n");
  else {
    for (int i = 0; i < x; i++)
      if (!(w[i] >= '0' && w[i] <= '9' || w[i] >= 'A' && w[i] <= 'Z' ||
            w[i] >= 'a' && w[i] <= 'z' || w[i] == '_')) {
        printf("NO\n");
        return 0;
      }
    if (y - x - 1 > 32)
      printf("NO\n");
    else {
      int cur = 0;
      for (int i = x + 1; i <= y; i++)
        if (i == y || w[i] == '.') {
          if (cur == 0 || cur > 16) {
            printf("NO\n");
            return 0;
          }
          cur = 0;
        } else {
          cur++;
          if (!(w[i] >= '0' && w[i] <= '9' || w[i] >= 'A' && w[i] <= 'Z' ||
                w[i] >= 'a' && w[i] <= 'z' || w[i] == '_')) {
            printf("NO\n");
            return 0;
          }
        }
      if (y == n)
        printf("YES\n");
      else if (y == n - 1 || n - y - 1 > 16)
        printf("NO\n");
      else {
        for (int i = y + 1; i < n; i++)
          if (!(w[i] >= '0' && w[i] <= '9' || w[i] >= 'A' && w[i] <= 'Z' ||
                w[i] >= 'a' && w[i] <= 'z' || w[i] == '_')) {
            printf("NO\n");
            return 0;
          }
        printf("YES\n");
      }
    }
  }
  return 0;
}
