A chemical company makes two brands of antifreeze. The first brand is 40% pure antifreeze, and the second brand is 90% pure antifreeze. In order to obtain 60 gallons of a mixture that contains 60% pure antifreeze, how many gallons of each brand of antifreeze must be used?