Assignment 2: First Alternative - Circular Sort

The Circular Sort Problem would be to print the points shown below, in the order that is labeled on the points.

If your program correctly prints the order of all points (but misses the point #5 (marked with a *), then you still get the mark for the assignment. But, if your program prints the 5th point correctly, you will get a Bonus Mark!
I will run your program against a set of inputs. The ouput format is as follows:

xcord1 ycord1
xcord2 ycord2
... ...
xcordN ycordN
0 0

For example, with this input:

0 3
1 3
1 1
3 1
0 0

The program should print this output:

1 1
0 3
1 3
3 1

Ideally, I would like to see solutions that exploit the dot-product property that we talked about.