old = list(map(int,input().split('.'))) old[0] *= 1000000 old[1] *= 1000 old = sum(old) num = list(map(int,input().split('.'))) num[0] *= 1000000 num[1] *= 1000 num = sum(num) print('YES' if old >= num else 'NO')