A century by Salman Ali Agha, the third of the innings, helped Pakistan to 556 in the first Test, but England responded brightly after losing Ollie Pope early.