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