Chú ý: bộ test do mình make(có thể có lỗi), không phải bộ test chính thức của kì thi
Yen has a math exam coming next week. To help her prepare for the exam, Trung set up a bunch of equations for her to practice solving. These equations has the form:
(a1*x+b1)*(a2*x+b2)...(an*x+bn) = 0
Trung wants to check how many different distinct solutions do these equation have.
The input starts with an integer T - the number of tests. Then T tests follow. For each test:
• The first line is the number n.
• In the next N lines, the i-th line has 2 integers ai, bi. (-100 <= ai, bi <= 100; ai or bi is non-zero)
For each test in the input, print the number of distinct solutions to the equation.
The equation is 2*(x + 2)*(2x + 4)*(3x + 5) = 0