A dairy needs 365 gallons of milk containing 7% butterfat. How many gallons each of milk containing 9% butterfat and milk containing 4% butterfat must be used to obtain the desired 365 gallons?