---
{"languages_supported":{"0":"NA"},"title":"SHORT","category":"NA","old_version":true,"problem_code":"SHORT","tags":{"0":"NA"},"layout":"problem"}
---
<h3> All submissions for this problem are available. </h3><p>Given <b>n</b> and <b>k</b>, find the number of pairs of integers (<b>a</b>, <b>b</b>) such that <b>n</b> < <b>a</b> < <b>k</b>, <b>n</b> < <b>b</b> < <b>k</b> and <b>ab-n</b> is divisible by <b>(a-n)(b-n)</b>.</p>
<h3>Input</h3>
<p>The first line contains the number of test cases <b>t</b> (1 ≤ <b>t</b> ≤ 5). Then <b>t</b> test cases follow, each test case consists of a line containing two integers <b>n</b> and <b>k</b> (0 ≤ <b>n</b> ≤ 100000, <b>n</b> < <b>k</b> ≤ 10<sup>18</sup>).</p>
<h3>Output</h3>
<p>For each test case output one line containing the required number.</p>
<h3>Example</h3>
<pre><b>Input:</b>
2
1 5
2 5
<b>Output:</b>
2
3
<b>Explanation:</b>
</pre>
<p>In the first test case, the only sought pairs are (2,2) and (3,3). In the second one, they are (3,3), (3,4) and (4,3).</p>