Scaling Laws of Synthetic Data for Language Models