Two bar magnets are kept together and suspended freely in earth's magnetic field. When both like poles are aligned, the time period is 6 sec. When opposite poles are aligned, the time period is 12sec. The ratio of magnetic moments of the two magnets is