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