#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  getline(cin, str);
  int state = 0;
  int len = 0, lenr = 0;
  int can = 0;
  for (int i = 0; i < str.size() && can == 0; ++i) {
    switch (state) {
      case 0:
        if (str[i] == '@') {
          if (len == 0 || len > 16) can = 1;
          len = 0;
          state = 1;
        } else if (!isalnum(str[i]) && str[i] != '_')
          can = 2;
        else
          len++;
        break;
      case 1:
        if (str[i] == '/') {
          if (lenr == 0 || lenr > 32 || len == 0 || len > 16) can = 3;
          len = 0;
          lenr = 1;
          state = 2;
        } else if (str[i] == '.') {
          if (len == 0 || len > 16) can = 4;
          len = 0;
        } else if (!isalnum(str[i]) && str[i] != '_')
          can = 5;
        else
          len++;
        lenr++;
        break;
      case 2:
        if (!isalnum(str[i]) && str[i] != '_')
          can = 6;
        else
          len++;
        break;
    }
  }
  if (lenr == 0 || lenr > 32 || len == 0 || len > 16) can = 7;
  cout << (can == 0 ? "YES" : "NO");
  return 0;
}
