Here is example. Just by rearranging layout a little bit, creepage distance could be increased several times.

That rectangular through hole pin pattern bottom left looks like the opto isolator. Only an idiot runs tracks
inside the footprint. I think the one just to the right of it is a Y cap. Likewise!