Since these are processors socket 478, both cooling solutions will work on both processors, so you should not have any issue installing them on any of the processors.
Make sure you clean all the thermal paste off each processor and each heatsync and apply new thermal grease. Everytime you pull your processor off, you want to clean this off and replace it so you get a good thermal bond between the processor and the heatsync.
Thanks, Adolfo and Martin.
Although both CPUs have very similar TDP (59.8W and 63.5W for Celeron and Pentium, respectively), which hetsink be more appropriate for the CPU with a higher TDP? That heavier, or that with a larger number of fins, or that with a larger fan diameter?
In this case since the wattage difference is only 4 watts, then the cooling solution will be the same for both.
The number of fins does not matter as long as the fan is designed to support the processor wattage requirements.