A jar contains a mix of nickels and dimes. The total number of coins is 40, and the total value of the coins is $3.20. How many nickels and how many dimes are in the jar? Let's think step by step and output the final answer within \boxed{}.
user