The challenge is to, given a list of points, sort in a way that, when they are connected in this order, they never intersect.

Input format (read from stdin):

```
X Y
1 2
3 4
5 6
...

```

Output should be the same as input, but sorted.

Rules:

* You can start from any point.
* The last point must be same as first one, making a close circuit.
* It should be done considering the Cartesian grid.
* You may assume that the input points do not all lie on a single line.
* The endpoints of each line do not count as intersecting.

For further help:

[![diagram](https://i.imgur.com/PERFmeS.png)](http://prntscr.com/3ayjys)