u,v \rbrace \subseteq V(G) \, | \, d(u,v)=3 \rbrace |.$$ The Wiener polarity index was introduced in [@Wiener], where H.Wiener used this index and the classical Wiener index to predict boiling points of paraffins. Later, Lukovits and Linert [@luko] demonstrated quantitative structure-property relationships for the Wiener polarity index in a series of acyclic and cycle-containing hydrocarbons. Furthermore, Hosoya and Gao analysed very good correlation of this index with liquid density [@hosoya]. In the same work, remarkably good correlations with refractive index and molar volume are also mentioned. In recent years, the Wiener polarity index was mostly studied on trees [@ali; @ashrafi; @deng; @deng1; @lei; @liu2] and also on unicyclic graphs [@hou; @liu]. Moreover, the Nordhaus-Gaddum-type results for this index were considered [@hua; @zhang] and the index was used to study properties of networks [@lei1]. Also, in [@tratnik] a cut method for the Wiener polarity index was developed for nanotubes and benzenoid graphs that can be embedded into the regular hexagonal lattice. Some other recent investigations on the Wiener polarity index can be found in [@hua1; @ilic; @il-il].

The Zagreb indices have been introduced in 1972 by Gutman and Trinajsti' c [@gut_tri]. For a graph $G$ with at least one edge, 