Magnetoresistance of multilayers with two magnetic components