Pakistan trail by 409 runs with nine wickets in hand