какой язык?
Program gt; var a,q:integer; begin read(a); q:=a mod 10; write(q,' '); q:=q*q; write(q); end.