using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp28 { class Program { static void Main(string[] args) { string[] row = Console.ReadLine().Split('.'); int[] fossil = new int[3]; for (int i = 0; i < 3; i++) { fossil[i] = int.Parse(row[i]); } row = Console.ReadLine().Split('.'); int[] judge = new int[3]; for (int i = 0; i < 3; i++) { judge[i] = int.Parse(row[i]); } for (int i = 0; i < 3; i++) { if (fossil[i] > judge[i]) { Console.WriteLine("YES"); return; } else if (fossil[i] < judge[i]) { Console.WriteLine("NO"); return; } } Console.WriteLine("YES"); } } }