Mahadev is the greatest Vaishnav and Narayan is greatest Shaiva.
Vishnu worships Shiva in his every incarnation.
Krishna did penance for many years meditating on Shiv-Shakti to get a boon regarding his children.
Ram send Hanuman to get a Shivlinga from Kashi, before leaving for Lanka, but, fearing that his prayer will be delayed to Mahadev he himself made a Shivlinga(Rameshwar temple).
Shivlinga is also found in Ayodhya, Ram janam bhoomi, when the land levelling was done. Shiva also provided Ram with the knowledge of Ishwar Geeta.
Parshuram Mahadev temple(Rajasthan) is the temple of Shiva made by Parshuram(6th incarnation of Vishnu) himself by cutting the rock with the fence, had performed rigorous penance for many years of Lord Shiva. On the basis of austerity, he had received Dhanush, Akshay Tumar and Divya Charias from Lord Shiva.
Shiva on the other hand always meditates on Vishnu.
Gopeshwar Mahadev is another temple which brings out the beauty of their relationship.Where Mahadev took a form of Gopi to enter Raasleela and Krishna realizing that Shiva is there declared that he should be worshiped every time before entering the Raas.
One can’t be a pure devotee if he/she is praying to one and disrespecting the other.