a, b, c = input().split('.') e, f, g = input().split('.') abc = int(a+b+c) efg = int(e+f+g) if abc >= efg: print('YES') else: print('NO')