Emilio wants to write a story! He has pens, each with colour and millilitres of ink, and an infinite supply of paper. He wants to write a story with a particular colour. He has calculated the number of pages that he wishes to write, and thus has calculated that he needs millilitres of ink. To write the story, he may only use one colour, though he is allowed to use multiple pens of the same colour. Your task is to find the number of different colours that he could write the story with.
Constraints
Input Specification
The first line contains two integers, and , respectively
The next lines each contain two integers, and , respectively.
Sample Output
One integer, the number of colours that he could write his story with.
Sample Input
5 6
4 7
3 2
4 2
3 3
1 8
Sample Output
2
Sample Explanation
He has a total of millilitres of colour , millilitres of colour 3, and millilitres of colour . Two of these colours have a total volume of over , so there are colours he could write with.
Comments