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