python:
print ("n = ",end="")
n=int(input())
for z in range(1, n):
for x in range(z, n):
for y in range(z, n):
if z*z+x*x==y*y: print("z = ","%2d"%z," x = ","%2d"%x," y = ","%2d"%y)
pascal:
var n,a,b,c,d:integer;
begin
readln(n);
for a:=1 to n-1 do
for b:=a to n-1 do
d:=a*a+b*b;
c:=1;
while c*c<d do c:=c+1;
if (d=c*c)and(c<n) then writeln(a,' ',b,' ',c);
end;
end.
python:
print ("n = ",end="")
n=int(input())
for z in range(1, n):
for x in range(z, n):
for y in range(z, n):
if z*z+x*x==y*y: print("z = ","%2d"%z," x = ","%2d"%x," y = ","%2d"%y)
pascal:
var n,a,b,c,d:integer;
begin
readln(n);
for a:=1 to n-1 do
for b:=a to n-1 do
begin
d:=a*a+b*b;
c:=1;
while c*c<d do c:=c+1;
if (d=c*c)and(c<n) then writeln(a,' ',b,' ',c);
end;
end.