using System; using System.Collections.Generic; using System.Linq; namespace SortItems { class Program { static void Main(string[] args) { var a = Console.ReadLine().Split('.').Select(int.Parse).ToList(); var b = Console.ReadLine().Split('.').Select(int.Parse).ToList(); for (var i = 0; i < 3; i++) { if (a[i] > b[i]) { Console.WriteLine("YES"); return; } else if (a[i] < b[i]) { Console.WriteLine("NO"); return; } } Console.WriteLine("YES"); } } }