Ramesh bought two boxes for Rs. 1300. He sold one box at a profit of 20% and the other box at a loss of 12%. If the selling price of both boxes is the same, find the cost price of each box.