using System.Collections.Generic; using System; using System.Drawing; namespace yukicoder { class Program { static void Main(string[] args) { var s = Console.ReadLine(); var str = Console.ReadLine(); List list = new List(6); List list2 = new List(6); int x = 0; while (s.Substring(x, 1) == str.Substring(x, 1)) { x++; } int a = int.Parse(s.Substring(x, 1)); int b = int.Parse(str.Substring(x, 1)); if (a < b) { Console.WriteLine("NO"); } else { Console.WriteLine("YES"); } } } }