跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F2715. Jabber ID

    ID: 2721 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 6 上传者: 标签>模拟字符串编程与模拟提高难度共享题库Codeforces英文题面题目来源题面语言

Jabber ID

题目描述

A. Jabber ID
time limit per test
0.5 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Jabber ID on the national Berland service «Babber» has a form <username>@<hostname>[/resource], where

  • <username> − is a sequence of Latin letters (lowercase or uppercase), digits or underscores characters «_», the length of <username> is between 1 and 16, inclusive.
  • <hostname> − is a sequence of word separated by periods (characters «.»), where each word should contain only characters allowed for <username>, the length of each word is between 1 and 16, inclusive. The length of <hostname> is between 1 and 32, inclusive.
  • <resource> − is a sequence of Latin letters (lowercase or uppercase), digits or underscores characters «_», the length of <resource> is between 1 and 16, inclusive.

The content of square brackets is optional − it can be present or can be absent.

There are the samples of correct Jabber IDs: mike@codeforces.com, 007@en.codeforces.com/contest.

Your task is to write program which checks if given string is a correct Jabber ID.

Input

The input contains of a single line. The line has the length between 1 and 100 characters, inclusive. Each characters has ASCII-code between 33 and 127, inclusive.

Output

Print YES or NO.

Examples
Input
mike@codeforces.com
Output
YES
Input
john.smith@codeforces.ru/contest.icpc/12
Output
NO

题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 2381 题。保留原作者与原赛事署名。