Abstract. We introduce a new polynomial in two variables, an SMP polynomial, such that the Szeged, Mostar and PI-indices are easily calculated using this polynomial. We define also its edge version. Then we study the basic properties of both these polynomials.