#include #include using namespace std; int main() { regex re("575"); string s; cin >> s; if (regex_search(s, re)) cout << "Yes"; else cout << "No"; cout << endl; return 0; }