Two pairs of socks and a pair of slippers cost $30. Five pairs of socks and a pair of slippers cost $42. How much does a pair of socks cost?