Yup, those coolers are pin compatible and I've done a similar thing with stock coolers in the past.
The only thing you really need to watch (and this isn't for you so much as it is for others who might see this thread in future), is that Intel sometimes bundles less able stock coolers with their lower power processors. On top of that, it can actually be quite difficult to find out the stock cooler type that a processor shipped with. In any case, strapping a cooler that shipped with a Pentium or i3 onto a higher TDP CPU would technically work, but may well result in high temps and thermal throttling because the anemic cooler isn't capable of handling the higher thermal loads.
In your case you're coming from a 95W i7 2600K, whose...