LogiQuest

341. Validate an Email Address

MediumValidation

Using simplified rules — exactly one @; the local part is non-empty and uses letters, digits, ., _ or -; the domain has at least one dot, does not start or end with a dot, has no empty labels and uses letters, digits, - and . — print VALID or INVALID.

Input format

A single line.

Output format

VALID or INVALID

Example 1

Input

user.name@example.com

Output

VALID

Example 2

Input

a@b.co

Output

VALID

Constraints

1 ≤ length ≤ 100

Read input from standard input and print the answer to standard output. Your code is judged against 8 test cases, most of them hidden.

Loading the MyLoginn IDE…