print('YES' if int(''.join(input().split('.'))) >= int(''.join(input().split('.'))) else 'NO')