print("YES" if input().find("575") >= 0 else "NO")