Irvin sold a book at a profit of $12\%.$ If Irvin had sold it for Rs. $18$ more, then $18\%$ would have been gained. Find the cost price.