using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoderTest { class Program { static void Main(string[] args) { string N = Console.ReadLine(); string X = Console.ReadLine(); string[] verstr = N.Split('.'); string[] judgestr = X.Split('.'); int cnt = 0; for (int i = 0; i < verstr.Length; i++) { int ver = int.Parse(verstr[i]); int judge = int.Parse(judgestr[i]); if(ver>=judge) { cnt++; } else { Console.WriteLine("NO"); break; } } if(cnt==3) { Console.WriteLine("YES"); } } } }