#t296. 完美立方

完美立方

Perfect Cubes

Problem Background

Special for beginners, ^_^

Problem Description

An equation of the form a3=b3+c3+d3a^3 = b^3 + c^3 + d^3 is called a perfect cube equation. For example 123=63+83+10312^3 = 6^3 + 8^3 + 10^3.

Write a program that, for a given positive integer N (N≤100)N\ (N \le 100), finds all quadruples (a,b,c,d)(a, b, c, d) such that a3=b3+c3+d3a^3 = b^3 + c^3 + d^3, where a,b,c,da, b, c, d are greater than 11, less than or equal to NN, and b≤c≤db \le c \le d.

Input Format

A positive integer N (N≤100)N\ (N \le 100).

Output Format

Output one perfect cube per line, in the following format:

Cube = a, Triple = (b,c,d)

where a,b,c,da, b, c, d are replaced by the actual values of the quadruple.

Output in ascending order of aa. When two perfect cube equations have the same aa, output the one with the smaller bb first; if still equal, the smaller cc first; if still equal, the smaller dd first.

Sample Input

24

Sample Output

Cube = 6, Triple = (3,4,5)
Cube = 12, Triple = (6,8,10)
Cube = 18, Triple = (2,12,16)
Cube = 18, Triple = (9,12,15)
Cube = 19, Triple = (3,10,18)
Cube = 20, Triple = (7,14,17)
Cube = 24, Triple = (12,16,20)

Constraints

1s, 1024KiB for each test case.