The correlation between the transverse momentum and the azimuthal asymmetry the flow is studied. A correlation coefficient is defined between the average transverse momentum of hadrons emitted in an event and the square of the elliptic or triangular flow coefficient. The hydrodynamic model predicts a positive correlation of the transverse momentum with the elliptic flow, and almost no correlation with the triangular flow in Pb-Pb collisions at LHC energies. In p-Pb collisions the new correlation observable is very sensitive to the mechanism of energy deposition in the first stage of the collision.