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