PRISM: Sparse recovery of the primordial spectrum from WMAP9 and Planck datasets