The maximum distance in a cardinal plane

Problem Name:
The maximum distance in a cardinal plane
Site:HackerEarth
Links:
Tags:
Problem setters: