using System; using System.Linq; using System.Collections.Generic; using System.Text.RegularExpressions; class Program { static void Main() { var ver1 = Console.ReadLine().Split(".").Select(int.Parse).ToArray(); var ver2 = Console.ReadLine().Split(".").Select(int.Parse).ToArray(); var Program = new Program(); for ( int i = 0; i < ver1.Length; i++) { if (ver1[i] == ver2[i]) { continue; } else { Program.CheckNum(ver1[i], ver2[i]); break; } } } public void CheckNum(int x, int y) { if ( x > y) { Console.WriteLine("YES"); } else if(x < y) { Console.WriteLine("NO"); } } }