#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5, mod = 1e9 + 7, mod1 = 998244353, mod2 = 1e9 + 9,
                inf = 1e18 + 7;
const long long infll = 1e18 + 7;
string s;
bool is_valid(char c) {
  return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
          (c >= '0' && c <= '9') || c == '_');
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> s;
  if (s.length() > 66) return cout << "NO", 0;
  ;
  long long phase = 1, cnt = 0, cnt2 = 0;
  for (long long i = 0; i < s.length(); i++) {
    if (is_valid(s[i])) {
      cnt++;
      if (cnt > 16) return cout << "NO", 0;
      ;
      continue;
    }
    if (s[i] == '@') {
      if (phase != 1) return cout << "NO", 0;
      ;
      if (cnt == 0) return cout << "NO", 0;
      ;
      phase = 2;
      cnt = 0;
      continue;
    }
    if (s[i] == '/') {
      if (phase != 2) return cout << "NO", 0;
      ;
      if (cnt == 0) return cout << "NO", 0;
      ;
      phase = 3;
      cnt2 += cnt;
      cnt = 0;
      if (cnt2 > 32) return cout << "NO", 0;
      ;
      continue;
    }
    if (s[i] == '.') {
      if (phase != 2) return cout << "NO", 0;
      ;
      if (cnt == 0) return cout << "NO", 0;
      ;
      cnt2 += cnt;
      cnt = 0;
      continue;
    }
    return cout << "NO", 0;
    ;
  }
  if (cnt == 0) return cout << "NO", 0;
  ;
  if (phase == 2) {
    cnt2 += cnt;
  }
  if (cnt2 > 32) return cout << "NO", 0;
  ;
  cout << "YES";
}
