One of them managed to swim back to the shore and alerted nearby residents, who informed the authorities