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