a=int(''.join(input().split('.'))) b=int(''.join(input().split('.'))) print('YES' if b<=a else 'NO')