a0 = int(input().replace('.','')) a1 = int(input().replace('.','')) print('YES') if (a0 - a1) > 0 else print('NO')