#include using namespace std; int main() { string s; cin >> s; int n = s.size(); for (int i = 0; i < n - 2; ++i) { if (s[i] == '5' && s[i + 1] == '7' && s[i + 2] == '5') { puts("YES"); return 0; } } puts("NO"); return 0; }