340 heads

I just got a 79 360 engine and have a chance to get a set of 340 heads cheap, would they work on a 360 engine?
Thanks