Preparando MOJI

Domain

2000ms 65536K

Description:

This problem doesn't contain real-world specifications about domains, just use the problem statement as a formal document to solve the problem.

The given string s is a domain name if it contains the characters "a"-"z", "0"-"9" and dots. No two dots shoud follow one after another (consecutive). The dots split the given string s into the parts, the last (most right) part should have the length 2 or 3. Domain can't start or end with a dot.

You are given the string s, check if it is domain name.

Input:

The only line of the input contains given string s. The string may contain any characters with ASCII codes from 33 to 127, inclusive. The string length is between 1 and 100, inclusive.

Output:

Print "YES" if the given string s is a domain name, or print "NO" if it is not.

Sample Input:

codeforces.com

Sample Output:

YES

Sample Input:

mail.v-kontakte.ru

Sample Output:

NO

Informação

Codeforces

Provedor Codeforces

Código CF64F

Tags

*specialexpression parsing

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:29:51

Relacionados

Nada ainda