Centuries by Abid and Azhar put Pakistan in strong position