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