#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int i = 0;
  str += ' ';
  while (str[i] != '@') {
    if (i > 16) {
      cout << "NO";
      return 0;
    }
    if (str[i] >= 48 && str[i] <= 57 || str[i] == '_' || islower(str[i]) ||
        isupper(str[i]))
      i++;
    else {
      cout << "NO";
      return 0;
    }
  }
  if (i == 0) {
    cout << "NO";
    return 0;
  }
  int j = 0;
  i++;
  while (str[i] != '/') {
    if (str[i] == ' ') {
      if (str[i - 1] != '.' && j != 0) {
        cout << "YES";
      } else
        cout << "NO";
      return 0;
    }
    if (j > 32) {
      cout << "NO";
      return 0;
    }
    if (islower(str[i]) || isupper(str[i]) || str[i] == '_' ||
        str[i] >= 48 && str[i] <= 57 ||
        (str[i] == '.' && str[i - 1] != '.' && j != 0)) {
      j++;
      i++;
    } else {
      cout << "NO";
      return 0;
    }
  }
  if (j == 0 || str[i - 1] == '.') {
    cout << "NO";
    return 0;
  }
  i++;
  int k = 0;
  while (str[i] != ' ') {
    if (k > 16) {
      cout << "NO";
      return 0;
    }
    if (str[i] >= 48 && str[i] <= 57 || str[i] == '_' || islower(str[i]) ||
        isupper(str[i])) {
      k++;
      i++;
    } else {
      cout << "NO";
      return 0;
    }
  }
  if (k == 0)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
