Sam has a collection of quarters and dimes. The total number of coins is 50, and the total value of the coins is $8.00. How many quarters and dimes does Sam have? Let's think step by step and output the final answer within \boxed{}.
user