def f(): return map(int, input().split(('.'))) A, B, C = f() a, b, c = f() print(['NO', 'YES'][(A, B, C) >= (a, b, c)])