A man I know runs a workshop in Calcutta. He bought two lathes to use in his workshop. However, he found out afterwards that they did not serve the purpose for which he had bought them, and so he decided to sell them. He sold them each for $600 making a loss of 20% on one of them and a profit of 20% on the other. Did he lose or gain in the transaction, and how much did each machine cost him?