Problem 8 : Pythagorean triplets



Problem

In this problem you are required to do the following: Given a number n, you have to calculate the number of pythagorean triplets (a,b,c) such that a < b < c <= n and a,b,c are relatively prime to each other, that is they have no common factor apart from 1. You also have to compute the number of integers 0 < p <= n which are not a part of any triplet.

Input

The input is a sequence of positive integers, each of which appears on a single line. The input is terminated by 0. You need not process this case. Each input integer will be atmost 100000.

Output

For each input number n, print two integers separated by a blank space. The first number is the number of pythagorean triplets, each of whose component is less than of equal to n, and whose components do not have any common factor between them. The second is the number of integers greater than 0 and less than or equal to n which are not a part of any triplet (not just relatively prime triplets).

Sample Input

10
25
100
0

Sample Output

1 4
4 9
16 27