A team from the secondary school went on a science-and-math quiz show. The science questions were worth 1 point and the math questions were worth 4 points. The team answered a total of 7 questions and earned 22 points. How many questions did the team answer in each category?