Write A Recursive Binary Partitioning