The Pontry-Agin maximum principle for minimax problems of optimal control