fossil = int(input().replace('.','')) ver = int(input().replace('.','')) print('YES' if ver <= fossil else 'NO')