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