Manually wrote Ord instance for XY so that y is ordered before x.
Added RectangularArea