/*
project euler problem 9: 求一组特殊的勾股数
answer:
*/
#include<bits/stdc++.h>
using namespace std;
int main(void)
{
int n = 1000;
for (int i = 1; i < n; ++i)
{
for (int j = i + 1; j < n; ++j)
{
int k = n - i - j;
if (k < i) break;
if (i * i + j * j == k * k)
{
cout << i << " " << j << " " << k << endl;
cout << i * j * k << endl;
}
}
}
return 0;
}