using System;
using System.Text.RegularExpressions;
public class Program
{
public static void Main()
string str = Console.ReadLine();
var pattern = @"[A-Za-z0-9]@[A-Za-z0-9]+\.[A-Za-z]";
bool res= Regex.IsMatch(str,pattern);
if(res==true)
Console.WriteLine("YES");
else
Console.Write("No");
}