A 450-gallon water storage tank is filled by a single inlet pipe, and two identical outlet pipes can be used to supply water to the surrounding fields (see the figure). It takes 9 hours to fill an empty tank when both outlet pipes are open. When one outlet pipe is closed, it takes 5 hours to fill the tank. Find the flow rates (in gallons per hours) in and out of the pipes.