using System; public class Program { public static void Main(string[] args) { string[] a = Console.ReadLine().Split('.'); string[] b = Console.ReadLine().Split('.'); if (int.Parse(b[0]+b[1]+b[2]) <= int.Parse(a[0]+a[1]+a[2])) { Console.WriteLine("YES"); } else { Console.WriteLine("NO"); } } }