#[Pyth], 31 bytes LhM_BSb_#m*[email protected]}MyMd2{MyMK./ **[Try it here!](https://pyth.herokuapp.com/?code=LhM_BSb_%23m%2a%21s%40M.cK%7DMyMd2%7BMyMK.%2F&input=%5B3%2C+1%2C+2%2C+5%2C+4%2C+7%2C+6%5D&debug=0)** [Pyth]: https://github.com/isaacg1/pyth Still not particularly happy with this, but it works. ###Explanation <pre> LhM_BSb_#m*[email protected]}MyMd2{MyMK./ | Full program. L | Define a function y, which takes an argument b. Sb | Sort b. _B | Bifurcate with reverse (returns [B, reverse(B)]. hM | Take the heads (first elements). m ./ | Map over partitions. yMd | Apply y to each in d. }M | Rangify each. K | Assign to a variable K. .c 2 | Two-element combinations. @M | Map and reduce each by their intersection. !s | Flatten and (logically) negate. * | If the above is truthy, then: yMK | Apply y to each in K. {M | And deduplicate each. Otherwise, it returns []. _# | Filter by reverse (used to discard empty lists). </pre>