#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for(int a=1; a<=n; a++){
for(int b=1; b<=n; b++){
for(int c=1; c<=n; c++){
if(a*a + b*b == c*c)
cout << a << " " << b << " " << c << endl;
else
continue;
}
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbjsKCWNpbiA+PiBuOwoJZm9yKGludCBhPTE7IGE8PW47IGErKyl7CgkJZm9yKGludCBiPTE7IGI8PW47IGIrKyl7CgkJCWZvcihpbnQgYz0xOyBjPD1uOyBjKyspewoJCQkJaWYoYSphICsgYipiID09IGMqYykKCQkJCQljb3V0IDw8IGEgPDwgIiAiIDw8IGIgPDwgIiAiIDw8IGMgPDwgZW5kbDsKCQkJCWVsc2UKCQkJCQljb250aW51ZTsKCQkJfQoJCX0KCX0KCXJldHVybiAwOwp9