Kkung wants to travel through space, so he started planning a trip. After weighing a few things, he decided that a ship's fuel and the time it takes to reach the destination matter most. Kkung is enormously rich and owns several spaceships, and each one has a slightly different top speed and fuel consumption rate. The fuel consumption rate is the amount of fuel burned per unit of time.
Assume every ship reaches its top speed the moment it departs. Work out for Kkung how many of his ships can travel all the way to the place he wants to visit.
The first line contains the number of test cases T (1≤T≤50).
The first line of each test case contains two integers separated by a space: the number of ships N (1≤N≤100) and the distance to the destination D (1≤D≤106). Each of the next N lines contains three integers separated by spaces: a ship's top speed vi (1≤vi≤1000), its amount of fuel fi (1≤fi≤1000), and its fuel consumption rate ci (1≤ci≤1000).
For each test case, print the number of ships that can reach the destination, one per line.
Watch out for integer division.