On selling two items at 40% profit and 20% loss respectively, a shopkeeper gained Rs. 172. If cost p