Let m,n be positive integers. Suppose $x_1 , ... x_m$ are positive integers between 1 and n and $y_1 , ... y_n$ are positive integers between 1 and m. Prove that there is a nonempty sub sequence of consecutive entries of $x_1 , ... x_m$ and a nonempty sub sequence of consecutive entries of $y_1 , ... y_n$ that have the same sum.
I'm not really sure how to prove this, I would imagine the pigeons are one set of entries, and the holes are another set of entries from the other sub sequence.. but I'm not really sure I get it.
As a hint, observe that the extreme case is $\gcd(m,n)=1$ and $x_i=n$ for all $i$, $y_j=m$ for all $j$. In this case the only consecutive subsequences that have the same sum are the entire sequences.