Present

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

문제

Today is the birthday of Farmer Eric’s cow, Emily. Since Emily didn’t manage to get a present last year, Eric wants to give her a square with delicious grass.

Farmer Eric’s farm has a broad field with n2n^2 pillars arranged in nn rows and nn columns. (The distance between the nearest pillars is 1,m1 \\, \mathrm{m}.)

He started to plan for Emily's birthday present to make Emily happy. In a couple of minutes, he figured out that the square should satisfy the following conditions:

  • have the pillars as its vertices;
  • have an area of at least a,m2a \\, \mathrm{m}^2.

For convenience, you can ignore the height and the thickness of the pillars.

Farmer Eric was thinking about the number of possible birthday presents for Emily but just gave up counting(probably because there was work left to do). Can you count it instead?

입력

The first line contains the number TT — the number of test cases.

The single line of each test case contains two integers nn and aa.

출력

For each test case, print the number of possible birthday presents for Emily. If there aren't any, print 0.

제한

  • T 1T \ge 1
  • 2n21032 \le n \le 2 \cdot 10^3
  • 1a(n1)2+11 \le a \le (n-1)^2+1
  • The total sum of nn over test cases doesn't exceed 21032 \cdot 10^3.
  • All values in input are integers.