for(i,0,n:=File standardInput readLine asNumber,for(j,0,n-1,write(a:=if(i*j<1,i+j,i*j)..""," "repeated(4-a size)))writeln(i max(1)*n))