Shawn made fudge brownies and peanut butter brownies. Each batch of fudge brownies makes 9 pans. Each batch of peanut butter brownies makes 7 pans. Shawn made 13 batches and ended up with 97 pans of brownies. How many batches of each type of brownie did he make?