#include <bits/stdc++.h>
using namespace std;
ifstream in("girdi.in");
int i, j, k, n;
char c;
string str;
void coz() {
  while (i < str.size() && str[i] != '@') {
    c = str[i];
    if (!((c <= 'z' && c >= 'a') || (c <= 'Z' && c >= 'A') ||
          (c <= '9' && c >= '0') || c == '_') ||
        i >= 16) {
      cout << "NO";
      return;
    }
    i++;
  }
  i++;
  if (i >= str.size() || str[i] == '.' || i == 1) {
    cout << "NO";
    return;
  }
  j = i;
  while (i < str.size() && str[i] != '/') {
    if (i >= j + 32) {
      cout << "NO";
      return;
    }
    k = i;
    if (str[i] == '.' && str[i - 1] == '.') {
      cout << "NO";
      return;
    }
    while (i < str.size() && str[i] != '.' && str[i] != '/') {
      c = str[i];
      if (i >= k + 16 || !((c <= 'z' && c >= 'a') || (c <= 'Z' && c >= 'A') ||
                           (c <= '9' && c >= '0') || c == '_')) {
        cout << "NO";
        return;
      }
      i++;
    }
    if (str[i] == '/') break;
    i++;
  }
  i++;
  if (str[i - 2] == '.' || (i >= str.size() && str[i - 1] == '/')) {
    cout << "NO";
    return;
  }
  k = 1;
  while (i < str.size()) {
    c = str[i];
    if (k > 16 || !((c <= 'z' && c >= 'a') || (c <= 'Z' && c >= 'A') ||
                    (c <= '9' && c >= '0') || c == '_')) {
      cout << "NO";
      return;
    }
    i++;
    k++;
  }
  cout << "YES";
}
int main() {
  cin >> str;
  coz();
  return 0;
}
