The Hayes family and the Cook family each used their sprinklers last summer. The water output rate for the Hayes family's sprinkler was 30L per hour. The water output rate for the Cook family's sprinkler was 20L per hour. The families used their sprinklers for a combined total of 55 hours, resulting in a total water output of 1450L. How long was each sprinkler used?