Double progenitor origin of the S-star cluster