Prune rows/cols at the same time