A box contains 4 bags of sugar. The total mass of all 4 bags is 7 kg. What is the mass of each bag in grams?