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