Mrs. Kato has 6 bags of dried beans and a 2-pound bag of rice in one shopping bag. In another shopping bag she has a 5-pound bag of flour. The two shopping bags weigh the same amount. What is the weight of each bag of dried beans?