<em>Erin and Dan went shopping at their local store. Erin bought shirts that cost $12 each and spent $18 on accessories. Dan bought the same number of shirts as Erin for $16 each and spent $10 on accessories.
</em>
<em>If Erin and Dan were billed the same amount by the store, how many shirts did each of them buy?</em>