#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
给你两个正整数 ,请你求出满足 的正整数 的数量,如果有无穷多个,输出 infinity
。
其中, 表示 除以 得到的余数。
Input
第一行一个整数 ,表示数据组数。 接下来 行,每行两个正整数 。
Output
输出 行,对于每组数据,如果存在无穷多个 ,输出 infinity
,否则输出一个正整数,表示解的个数。
Samples
3
19 3
1145 14
5 5
3
5
infinity