The compound interest on a certain sum of money for two years is Rs 525 and the simple interest on the same sum of money at the same rate and same time is Rs 500. Find the sum.