package no138; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println(kaseki(sc.next()) >= kaseki(sc.next()) ? "YES" : "NO"); } public static int kaseki(String s) { String[] t = s.split("\\."); int n = 0; for(int i=0;i<3;i++) { n = n * 101 + Integer.valueOf(t[i]); } return n; } }