A school district receives a donation of 15,000 pencils. At one of the middle school in the district, there are 4 math classes. At each of the other three middle schools in the district, there are 6 math classes each. Each math class gets the same number of pencils. How many pencils does each math class get?