Олимпиадный тренинг

Задача 38689. Point sorting


Print all initial points in ascending order of their distances from the origin.

Create a Point structure and store the original data in an array of Point structures.

Input
The program receives a set of points on the plane as input. First, the number of points n is given, then there is a sequence of n lines, each of which contains two numbers: the coordinates of the point. The value of n does not exceed 100, all initial coordinates – integers not exceeding 103.

Imprint
It is necessary to display  all initial points in ascending order of their distances from the origin. The program displays only the coordinates of the points, there is no need to display their number.

 Examples
# Input Output
1 2
1 2
2 3
1 2
2 3