Maximize Your Data's Potential: Enhancing LLM Accuracy with Two-Phase Pretraining