#include <bits/stdc++.h>
struct checker {
  bool operator()(char c) const {
    return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' ||
           c >= '0' && c <= '9' || c == '_';
  }
};
int main(int argc, char* argv[]) {
  ::std::ios::sync_with_stdio(false);
  std::string s;
  std::getline(std::cin, s);
  std::string username;
  std::string hostname;
  std::string resource;
  std::string::size_type pos_doc = s.find('@'), pos_slash;
  if (pos_doc != std::string::npos) {
    username = s.substr(0, pos_doc);
    pos_slash = s.find('/', pos_doc);
    if (pos_slash != std::string::npos) {
      hostname = s.substr(pos_doc + 1, pos_slash - pos_doc - 1);
      resource = s.substr(pos_slash + 1);
      if (resource.empty()) resource = "&&";
    } else {
      hostname = s.substr(pos_doc + 1);
    }
  }
  bool cA = false, cB = false, cC = false;
  {
    cA = ((username.size() >= 1 && username.size() <= 16)) &&
         std::all_of(username.begin(), username.end(), checker());
  }
  {
    if (hostname.size() >= 1 && hostname.size() <= 32) {
      hostname += '.';
      std::string::const_iterator it_beg = hostname.cbegin(),
                                  it_en = hostname.cend(), it_cur;
      cB = true;
      for (it_cur = it_beg; it_cur != it_en; ++it_cur) {
        if (*it_cur == '.') {
          std::size_t len = std::distance(it_beg, it_cur);
          bool r =
              (len >= 1 && len <= 16) && std::all_of(it_beg, it_cur, checker());
          if (!r) cB = false;
          it_beg = std::next(it_cur);
        }
      }
    }
  }
  {
    if (resource.empty())
      cC = true;
    else
      cC = (resource.size() >= 1 && resource.size() <= 16) &&
           std::all_of(resource.begin(), resource.end(), checker());
  }
  if (cA && cB && cC)
    std::cout << "YES\n";
  else
    std::cout << "NO\n";
  return 0;
}
