# -*- coding: utf-8 -*- old = int(input().replace(".", "")) judging = int(input().replace(".", "")) result = "NO" if judging <= old: result = "YES" print(result)