Two-mode multi-partitioning