The Peterson family and the Price family each used their sprinklers last summer. The water output rate for the Peterson family's sprinkler was 15 L per hour. The water output rate for the Price family's sprinkler was 20 L per hour. The families used their sprinklers for a combined total of 35 hours, resulting in a total water output of 625 L. How long was each sprinkler used?