The only way I know how to do this is to test every possible subset and see if its a valid rectangle (there aren\'t any points inside it that aren\'t in the current subset b