Multiway Partitioning with Pairwise Movement