LearnPy Hub
← Tuples & Sets problems
Hard

Points With namedtuple

Create Point = namedtuple('Point', 'x y'). Read n points, store them as Points and print the one farthest from the origin as Point(x=…, y=…) (the first one if tied).

Input

n, then n lines 'x y'.

Output

One line.

Sample 1

Input
3
1 2
-3 1
0 0
Output
Point(x=-3, y=1)

Sample 2

Input
1
5 5
Output
Point(x=5, y=5)
solution.py
Output appears here
Points With namedtuple · Python practice problem · LearnPy Hub