Quinton ton helps SA set daunting task for Pakistan