for m in range(2,10): for n in range(1,m): print(f"{n}\t{m}\t{m*m-n*n}\t{2*m*n}\t{m*m+n*n}") print()