using System; using System.Linq; class Program { static void Main(string[] args) { // No.138 化石のバージョン int[] kasekiVer = Console.ReadLine().Split('.').Select(s => int.Parse(s)).ToArray(); int[] hanteiVer = Console.ReadLine().Split('.').Select(s => int.Parse(s)).ToArray(); bool isKaseki = true; for (int i = 0; i < kasekiVer.Length; i++) { if (kasekiVer[i] < hanteiVer[i]) isKaseki = false; } Console.WriteLine(isKaseki ? "YES" : "NO"); } }