The local ice cream shop serves 31 different flavors of ice cream. A sundae includes one scoop of any flavor ice cream, along with a syrup and a topping, both of which are optional. There are 5 different types of syrups and 12 different types of toppings. A) How many different types of sundae can be ordered? (Note: a chocolate ice cream sundae without any syrup or topping should be counted separately from a chocolate ice cream sundae with chocolate syrup and no topping.) B) If a sundae is allowed to have three scoops of ice cream where each scoop must be a different flavor (order of scoops doesn't matter), and either a syrup or a topping (but not both) are required, how many different types of sundaes can be ordered?