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