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