class Problem0558: def solve(this): s = input() if "575" in s: print("YES") else: print("NO") if __name__ == "__main__": problem = Problem0558() problem.solve()