#include #include using namespace std; int main() { const string c = "575"; string str; cin >> str; int strLength = str.length(); int cursor = 0; bool isContaining = false; for (int i = 0; i < strLength; i++) { if (str[i] == c[cursor]) { if (++cursor == c.length()) { isContaining = true; break; } } else { cursor = 0; } } cout << (isContaining ? "YES" : "NO") << "\n"; int a; cin >> a; }