In a classroom, there are three types of students based on their participation in extracurricular activities: those who participate in sports, those who participate in clubs, and those who participate in both. The ratio of students participating only in sports to those participating only in clubs is 3:4. If there are 12 students who participate in both and the total number of students is 48, how many students participate only in sports and how many participate only in clubs? Let's think step by step and output the final answer within \boxed{}.
user