A dealer gets Rs. 30 less if instead of selling a chair at a gain of 12% he sells it at a gain of 8%. Find the cost price of the chair.