Q10174: Couple-Bachelor-Spinster Numbers

任何數都可以用2個平方數的差來表達嗎?例如:40 可以用112 - 92 或者 72 - 32來表達。如果可以的話,我們稱這些數為「square-couple numbers」。你的任務是找出:

Input

輸入含有多組測試資料。

每組測試資料一列,含有 1 個或 2 個 32 位元有號整數(singed 32 bit integer)。請參考Sample Input。

Output

對每一組測試資料輸出一列。如果輸入僅有1個整數 N,請輸出兩個不為負數的整數 ab ,使得  a*a - b*b = N。如果找不到這樣的形式,若 N 為偶數請輸出 Bachelor Number. ,若 N 為奇數請輸出 Spinster Number.

如果輸入有2個整數 n1n2,請輸出介於 n1n2(包含 n1n2)之間,有多少個 bachelor number。請注意 n1 < n2  ,並且 ( n2 - n1)<=1000000。

Sample Input Sample Output
6
12
3
-5
3 7
-6
Bachelor Number.
4 2
2 1
2 3
1
Bachelor Number.