#include <bits/stdc++.h>
using namespace std;
char c;
int s = 0, k = 0, n = 0, x, f = 0;
;
int main() {
  while (cin.get(c)) {
    if (c == '\n') break;
    switch (s) {
      case 0: {
        if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '_' ||
            c >= '0' && c <= '9') {
          s = 1;
          k++;
        } else {
          cout << "NO";
          return 0;
        }
        break;
      }
      case 1: {
        if ((c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '_' ||
             c >= '0' && c <= '9') &&
            k < 16)
          k++;
        else if (c == '@') {
          s = 2;
          k = 0;
          f = 1;
        } else {
          cout << "NO";
          return 0;
        }
        break;
      }
      case 2: {
        if ((c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '_' ||
             c >= '0' && c <= '9') &&
            k < 16 && n < 32) {
          k++;
          n++;
          f = 0;
        } else if (c == '.' && f == 0) {
          k = 0;
          n++;
          f = 1;
        } else if (c == '/' && f == 0) {
          k = 0;
          f = 1;
          s = 3;
        } else {
          cout << "NO";
          return 0;
        }
        break;
      }
      case 3: {
        if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '_' ||
            c >= '0' && c <= '9') {
          k++;
          f = 0;
        } else if (c == '/' && f == 0) {
          k = 0;
          f = 1;
        } else {
          cout << "NO";
          return 0;
        }
        break;
      }
    }
  }
  if (f == 1)
    cout << "NO";
  else
    cout << "YES";
}
