<reponame>nxexox/acm.timus<filename>solutions/2012.py
f = int(input())
if (12 - f) * 45 <= 60 * 4:
    print("YES")
else:
    print("NO")

f = int(input())
if (12 - f) * 45 <= 60 * 4:
    print("YES")
else:
    print("NO")