For each word in the picture shown below, there is a point that represents the top-left point $(x, y)$ of the rectangle.
How would you find which point is at the most top-left of the page given a random set of points?
In other words, how do you sort a random set of points like this to create the correct English sentence order?
Thanks.

A simple way is to find the corner that minimizes $x+my$ (assuming a top-down $y$ axis), where $m$ is a well-chosen slope parameter. The green line is the locus of $x+my=\text{Cst}$, it must intersect a single box.