Sanjay borrowed a certain sum from Anil at a certain rate of simple interest for 2 years. He lent this sum to Ram at the same rate of interest compounded annually for the same period. At the end of two years, he received Rs. 4200 as compound interest but paid Rs. 4000 only as simple interest. Find the rate of interest?