A recipe for whole grain bread calls for 1 oz of rye flour for every 4 oz of whole wheat flour. How many ounces of each kind of flour should be used to make a loaf of bread weighing 22 oz?