#include <bits/stdc++.h>
using namespace std;
string s;
int n;
int main() {
  cin >> s;
  n = s.size();
  if (regex_match(
          s, regex("^[a-zA-Z0-9_]{1,16}@([a-zA-Z0-9_]{1,16}|[a-zA-Z0-9_]{1,16}("
                   "[.][a-zA-Z0-9_]{1,16}){0,14})($|\/[a-zA-Z0-9_]{1,16})$")) &&
      regex_match(s, regex("^[a-zA-Z0-9_]{1,16}@[a-zA-Z0-9_.]{1,32}($|\/[a-zA-"
                           "Z0-9_]{1,16})")) &&
      s.find("..") == string::npos) {
    cout << "YES";
  } else
    cout << "NO";
}
