N = str(input()) if "575" in N: print("YES") else: print("NO")