Put . Let be the sets of prefix sums of the two sequences, including zero. Each has elements.
A collision between distinct pairs is equivalent to a common positive difference in : after exchanging the pairs, . These differences are exactly nonempty segment sums.
Thus all sums are distinct. Their maximum is
so they represent every integer in exactly once.
Conversely, such sets give positive sequences with disjoint segment sums by taking consecutive differences of their sorted elements. We must also check that neither sequence is constant.