Write Recursive Binary Partitioning