digit -> {2;3;4;5;6;7;8;9}.

pyth(A,B,C) :- A*A =:= B*B+C*C.

main :-
        pyth(A:digit,B:digit,C:digit),
        A=\=0, gc,
        write(A,B,C), nl, fail.
main.

main2 :-
	pyth(A,B,C),
	A=digit,
	B=digit,
	C=digit,
        gc,
        write("Ans: ",A," ",B," ",C), nl, fail.
main2.
