A group of 40 children attend a baseball game. Each child received either a hotdog or a bag of popcorn. Hotdogs were $2.25 and popcorn was $1.75. If the total bill was $83.50, how many hotdogs and bags of popcorn were purchased