#include <bits/stdc++.h>
using namespace std;
int main() {
  string x;
  cin >> x;
  string vec[1000];
  for (int i = 0; i < 1000; i++) vec[i] = "";
  int c = 0;
  bool f = 0, isOK = 1;
  for (int i = 0; i < x.length(); i++) {
    if (!f) {
      if (x[i] >= 'A' && x[i] <= 'Z' || x[i] >= '0' && x[i] <= '9' ||
          x[i] >= 'a' && x[i] <= 'z' || x[i] == '_')
        vec[c] += x[i];
      else if (x[i] == '@') {
        f = 1;
        c++;
      } else
        isOK = 0;
    } else {
      if (x[i] == '.' || x[i] == '/')
        c++;
      else {
        if (x[i] >= 'A' && x[i] <= 'Z' || x[i] >= '0' && x[i] <= '9' ||
            x[i] >= 'a' && x[i] <= 'z' || x[i] == '_')
          vec[c] += x[i];
        else
          isOK = 0;
      }
    }
  }
  char temp = x[x.length() - 1];
  if (temp >= 'A' && temp <= 'Z' || temp >= '0' && temp <= '9' ||
      temp >= 'a' && temp <= 'z' || temp == '_') {
  } else
    isOK = 0;
  for (int i = 0; i < c; i++) {
    if (!(vec[i].length() >= 1 && vec[i].length() <= 16)) isOK = 0;
  }
  if (isOK)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
