Pakistan's Prime Minister Nawaz Sharif met with Iranian president Hassan Rouhani on Tuesday after visiting Saudi Arabia in a bid to ease tensions between the two regional rivals.