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