Last year the volleyball team paid $5 per pair for socks and $17 per pair for shorts on a total purchase of $315. This year they spent $342 to buy the same number of pairs of socks and shorts because the socks now cost $6 a pair and the shorts cost $18.
Write a system of two equations that represents the number of pairs of socks and shorts bought each year.