#R1015. [KBC001G] ABC

[KBC001G] ABC

Problem Statement

Given an integer nn, find all positive integers aa, bb, and cc that satisfy the following conditions:

  • 1a<b<cn1 \leq a \lt b \lt c\leq n
  • a2+b2=c2a^{2}+b^{2}=c^{2}

Constraints

  • 1n1061\leq n\leq 10^6
  • nn is an integer.

Input

The input is given from Standard Input in the following format:

$\color{#cccccc}\boxed{\color{white}{\large{|}}\color{black}n\color{white}{\large{|}}}$

Output

Output all the values of aa, bb, and cc that satisfy the conditions, with the values sorted in lexicographical order from smallest to largest. Each of the numbers is separated by space.

Sample Input 1

5

Sample Output 1

3 4 5

Sample Input 2

20

Sample Output 2

3 4 5
5 12 13
6 8 10
8 15 17
9 12 15
12 16 20