Problem Analysis:
Observation: To check the distance between 2 points X1,Y1 and X2,Y2, we can use the formula of Euclidean distance :-
As the co-ordinate of our origin is (0,0) , then the distance between origin(0,0) and a point(X,Y) is .
Solution Idea: So we loop through all the points (X,Y) and check which point gives us minimum distance using . That point is our answer point.