sol(N,Z) :-
	between(10, 99, N),
	Z is N*N,
	Z >= 1000,
	Z // 100 + Z mod 100 =:= N.

between(X,Y,Z) :- X =< Y, Z is X.
between(X,Y,Z) :- X < Y, X1 is X+1, between(X1,Y,Z).
