Once upon a time, a queen sent out three servants to buy gems for her treasury. The first servant paid $112,000 for 2 diamonds and 1 ruby. The second servant paid $127,000 for 2 diamonds, 3 emeralds, and 1 ruby. The third servant paid $62,000 for 1 diamond and 2 emeralds. The diamonds all cost the same amount, the rubies all cost the same amount, and the emeralds all cost the same amount. How much did each kind of gem cost the queen?