Suppose the length of wire is l.
When wire formed in circular loop then radius of loop r=2πl
Magnetic dipole M1=iA=iπr2 =iπ×(2πl)2=i×4πl2
When wire formed in square loop then the side of loop a=l/4
Magnetic dipole M2=IA=i×a2=i×16l2 ∴M2M1=π4