#Lutece3219. mod

mod

Migrated from Lutece 3219 mod

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

给你两个正整数 a,ba,b,请你求出满足 amodx=ba \bmod x=b 的正整数 xx 的数量,如果有无穷多个,输出 infinity
其中,amodba \bmod b 表示 aa 除以 bb 得到的余数。

Input

第一行一个整数 t(1t100)t(1\le t\le 100),表示数据组数。 接下来 tt 行,每行两个正整数 a,b(1a,b109)a,b(1\le a,b\le10^9)

Output

输出 tt 行,对于每组数据,如果存在无穷多个 xx,输出 infinity,否则输出一个正整数,表示解的个数。

Samples

3
19 3
1145 14
5 5
3
5
infinity