#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string s;
  cin >> s;
  string t;
  int i = 0;
  int n = s.length();
  bool ans = true;
  while (i < n) {
    if (s[i] == '@') break;
    t += s[i];
    i++;
  }
  if (i == n) {
    ans = false;
  }
  if (t.empty() || t.length() > 16) {
    ans = false;
  }
  for (char x : t)
    if (!isalpha(x) && !isdigit(x) && x != '_') {
      ans = false;
      break;
    }
  i++;
  t = "";
  while (i < n) {
    if (s[i] == '/') break;
    t += s[i];
    i++;
  }
  if (t.empty() || t.length() > 32) {
    ans = false;
  }
  for (char x : t)
    if (!isalpha(x) && !isdigit(x) && x != '_' && x != '.') {
      ans = false;
      break;
    }
  string q;
  for (char x : t) {
    if (x == '.') {
      if (q.empty() || q.length() > 16) {
        ans = false;
        break;
      }
      q = "";
    } else
      q += x;
  }
  if (q.empty() || q.length() > 16) {
    ans = false;
  }
  t = "";
  bool res = false;
  if (i < n) res = true;
  i++;
  while (i < n) {
    if (!isalpha(s[i]) && !isdigit(s[i]) && s[i] != '_') {
      ans = false;
      break;
    }
    t += s[i];
    i++;
  }
  if (res && (t.empty() || t.length() > 16)) {
    ans = false;
  }
  if (ans)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
