#include <bits/stdc++.h>
using namespace std;
int n, p, p1, p2;
char s[201];
int pd(char c) {
  if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') ||
      (c >= 'a' && c <= 'z') || (c == '_'))
    return 1;
  return 0;
}
int main() {
  cin >> s;
  n = strlen(s);
  if (n > 70) {
    cout << "NO" << endl;
    return 0;
  }
  while (p < n && s[p] != '@') p++;
  if (p == n) {
    cout << "NO" << endl;
    return 0;
  }
  if (p < 1 || p > 16) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 0; i < p; i++) {
    if (!pd(s[i])) {
      cout << "NO" << endl;
      return 0;
    }
  }
  p1 = p + 1;
  while (p < n && s[p] != '/') p++;
  if (p - p1 < 1 || p - p1 > 32) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = p1; i < p; i++) {
    if (s[i] == '.') {
      if (p2 < 1 || p2 > 16) {
        cout << "NO" << endl;
        return 0;
      }
      p2 = 0;
    } else {
      if (!pd(s[i])) {
        cout << "NO" << endl;
        return 0;
      }
      p2++;
    }
  }
  if (p2 < 1 || p2 > 16) {
    cout << "NO" << endl;
    return 0;
  }
  if (p < n) {
    p2 = 0;
    for (int i = p + 1; i < n; i++) {
      if (s[i] == '/') {
        if (p2 < 1 || p2 > 16) {
          cout << "NO" << endl;
          return 0;
        }
        p2 = 0;
      } else {
        if (!pd(s[i])) {
          cout << "NO" << endl;
          return 0;
        }
        p2++;
      }
    }
    if (p2 < 1 || p2 > 16) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
