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