#include [[nodiscard]] static inline constexpr const char* solve(const std::string& S) noexcept { if (S.find("575") != S.npos) return "YES"; else return "NO"; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); std::string S; S.reserve(100), std::cin >> S; std::cout << solve(S) << '\n'; return 0; }