A bag contains apples and oranges. The total weight of the bag is 8 kilograms, and the weight of the apples is 3 times the weight of the oranges. How much does each type of fruit weigh? Let's think step by step and output the final answer within \boxed{}.
user