You are given an equilateral triangle ΔABC with the side BC being the base. Each side of the triangle is of length L. There are L-1 additional points on each of the sides dividing the sides into equal parts of unit lengths. Points on the sides of the triangle are called major points. Joining these points with lines parallel to the sides of ΔABC will produce some more equilateral triangles. The intersection points of these parallel lines are called minor points. 

Look at the picture below. It contains 

- Major points: A, B, C, P1, P2, Q1, Q3, R1, R4, S1, S2, S3 (note that we consider A, B, C as major points as well)
- Minor points: Q2, R2, R3
- Equilateral triangles ΔP1Q1Q2, ΔQ2S1S3, etc

We consider an equilateral triangle to be valid if

- Each of its vertices is either a major or a minor point, and
- The distance from its base (the base of a triangle is the side parallel to BC) to BC is less than the distance from the other vertex of the triangle (i.e. opposite vertex that doesn't lie on the base of triangle) to BC.

In the figure above, ΔQ2P1P2 is not a valid triangle but ΔQ2R2R3 is a valid triangle.

You will be given L, the length of the original triangle ΔABC. You need to find out the number of valid equilateral triangles with side length exactly K.

-----Input-----
- The first line of the input contains an integer T denoting the number of test cases. The description of each testcase follows.
- Each test case has one line containing two space-separated integers: L and K.

-----Output-----
For each testcase, print "Case i: ", and then the answer, where i is the testcase number, 1-indexed.

-----Constraints-----
- 1 ≤ T ≤ 500
-  1 ≤ L, K ≤ 5000

-----Example-----
Input:
2
4 3
4 4

Output:
Case 1: 3
Case 2: 1

-----Explanation-----

The figure presented in the problem description is a triangle with side length 4.
In testcase 1, the valid triangles are ΔAR1R4, ΔP1BS3, ΔP2S1C

In testcase 2, the only valid triangle is ΔABC

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'try:\n for j in range(1,int(input())+1):\n  [a,b],c=list(map(int,input().split(" "))),0\n  for i in range(1,a-b+2):\n   c+=i\n  print("Case",str(j).__add__(":"),c)\nexcept: pass'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13077