#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVI; typedef vector VVL; typedef pair P; typedef pair PL; int main(){ string s; cin >> s; REP(i,(int)s.length()-2){ if (s.substr(i,3) == "575"){ cout << "YES" << endl; return 0; } } cout << "NO" << endl; return 0; }