Grace went to the grocery store and bought bottles of soda and bottles of juice. Each bottle of soda has 50 grams of sugar and each bottle of juice has 25 grams of sugar. Grace purchased 3 more bottles of soda than bottles of juice and they all collectively contain 600 grams of sugar. Determine the number of bottles of soda purchased and the number of bottles of juice purchased.