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