On the Maurey--Pisier and Dvoretzky--Rogers theorems