from distutils.version import StrictVersion v0 = input() v1 = input() if StrictVersion(v1) <= StrictVersion(v0): print('YES') else: print('NO')