You went shopping and bought a total of 31 items, some of them pants and some of them shirts. The shirts cost $7 and the pants cost $22 and you spend $517 in total. How many shirts and how many pants did you buy?

Shirts________
Pants________