P12810 [HackerEarth] email validator
普及
题目描述

Chinna and Chinnu has recently started developing a website for their startup from scratch. But they found it difficult to validate an Email field for their login forum. Help them build one.

An Email Address is of the form <username>@<hostname>

<username> consists of 1 - 16 characters inclusive and contains only small, capital letters, digits [0-9], underscore '_'

<username> and <hostname> are separated by an ‘@’ character

<hostname> consists of 1 - 16 characters inclusive and contains only small, capital letters, digits [0-9], hyphens (‘-’) (this part has to contain at least one alphabet) and a dot (‘.’) followed by 1- 10 characters with small letter characters only

NOTE : <hostname> is [1-16] characters + '.' + [1-10] characters

Input :

Given a number n and n email addresses to validate

Output:

For each email address, print “YES” without quotes if the email is valid else “NO”

Constraint:

1 ≤ n ≤ 100

SAMPLE INPUT
3
[email protected]
[email protected]
[email protected]

SAMPLE OUTPUT
YES
NO
YES

输入格式

见题面

输出格式

见题面

样例输出
YES NO YES