male cats will shit and piss everywhere to mark territory. It starts around 8~14 month old as they mature. so if this started recently, it's not because they're untrained.
if this was the case from the beginning, they are untrained. clean the area they defecate in thoroughly to completly...