A 350-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. It takes 7 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 hour) in and out of the pipes. (Round to the nearest whole number.)