Penelope has $3.40 worth of dimes and quarters. She has a total of 22 dimes and quarters altogether. Determine the number of dimes and the number of quarters that Penelope has.