#include #include int main() { char line_str[200], line_other[200], ch; int occurrences(char *, char, int, int), a, b; while (gets(line_str) != NULL) { gets(line_other); sscanf(line_other, "%c %d %d", &ch, &a, &b); puts(occurrences(line_str, ch, a, b) ? "YES" : "NO"); } return EXIT_SUCCESS; }