Mr Yang’s son has a total of twenty-one $1 and $2 coins in his money box. When he counts his money, he finds that its total value is $30. How many coins of each type does he have?