The first line contains the number n >= 0
The second line contains the number B and the number k
Display
- the word YES, if the digit B occurs in the number more than k times
- the word NO, if the digit B occurs in the number less than k times
- number k, if digit B occurs exactly k times
Sample input and output
test number |
Input |
Output |
1 |
45545
5 6 |
NO
|
2 |
45545
5 3 |
3 |