#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  string s1 = "1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM_";
  int j = 0;
  int cnt = 0;
  while (s[j] != '@') {
    if (s1.find(s[j]) != -1) {
      cnt++;
      if (cnt > 16) {
        cout << "NO";
        return 0;
      }
    } else {
      cout << "NO";
      return 0;
    }
    j++;
  }
  if (s[int(s.size()) - 1] == '@') {
    cout << "NO";
    return 0;
  }
  if (cnt == 0) {
    cout << "NO";
    return 0;
  }
  int ind = j + 1;
  cnt = 0;
  bool f = 0;
  int k = 0;
  int cl = 0;
  int toc = 0;
  bool w = 1;
  for (int i = int(ind); i < int(int(s.size())); i++) {
    if (s[i] != '.') {
      if (s[i] == '/') {
        f = 1;
        ind = i;
        break;
      } else {
        if (s1.find(s[i]) != -1) {
          cnt++;
          if (cnt > 16) {
            cout << "NO";
            return 0;
          }
        } else {
          cout << "NO";
          return 0;
        }
      }
    } else {
      w = 0;
      if (s[i] == '.' && s[i + 1] == '.') {
        cout << "NO";
        return 0;
      }
      toc++;
      cl++;
      k += cnt;
      cnt = 0;
      if (k > 32 || k < 1) {
        cout << "NO";
        return 0;
      }
    }
  }
  if (f == 1) {
    if (s[ind - 1] == '.') {
    } else {
      cl++;
    }
  } else {
    if (s[int(s.size()) - 1] == '.') {
    } else {
      cl++;
    }
  }
  if (w == 1 && cnt > 1) {
  } else {
    if (toc >= cl) {
      cout << "NO";
      return 0;
    }
  }
  if (cl < 1) {
    cout << "NO";
    return 0;
  }
  if (f == 1) {
    cnt = 0;
    for (int i = int(ind + 1); i < int(int(s.size())); i++) {
      if (s1.find(s[i]) != -1) {
        cnt++;
        if (cnt > 16) {
          cout << "NO";
          return 0;
        }
      } else {
        cout << "NO";
        return 0;
      }
    }
    if (cnt > 1) {
      cout << "YES";
    } else
      cout << "NO";
  } else {
    cout << "YES";
  }
}
