Mason has nickels and dimes. He has a total of 31 coins. The value of his coins is $2.65. How many nickels and dimes does he have?