A family of 10 purchased tickets to the county fair. Tickets for adults cost $6 and tickets for children cost $3. If the total cost of the tickets was $42, how many family members were adults and children?