The one who works is the one who eats... nothing

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

<<Agreement is a product with full non-resistance of parties>>, nevertheless, Mechnikov was forced to haul the theatrical props.

By the time he had finished pp percent of the task, the manager of the theater realized they did not have enough provision to feed the worker until he finished the work. Mechnikov ate qq percent of the received provision, with qq greater than pp.

That's when the manager, by slightly altering the popular motto <<the one who does not work is the one who eats>> came up with <<the one who works is the one who eats... nothing>> (or almost nothing). For this reason, he decided to assign some free workforce to the toiling proletarian --- a few coders who work for food. Each of the coders works aa times faster than the electrician and eats bb times slower. 

The supply of free coders is virtually unlimited, but there is no reason to get too many of them. What if this becomes news and a great crowd of them arrives, craving free food? Help the manager to find the smallest necessary number of coders sufficient to make the available provision last until the work is finished.

입력

The first line of the input file contains a single number tt (1t31041 \leq t \leq 3 \cdot 10^4) --- the number of tests. Each of the following tt lines of the input file contains four integers 0<p,q,a,b<1000 < p, q, a, b < 100, denoting, correspondingly, the percentage of completed work, the percentage of consumed provision, and how many times faster does a coder work, and how many times slower he eats. It is guaranteed that q>pq > p.

출력

As an answer to each of tt tests, print a single integer --- the minimum number of coders necessary to do the job. If it is impossible to complete the work, print -1.