UVa 10963 - The Swallowing Ground

10963 - The Swallowing Ground

 * http://acm.uva.es/p/v109/10963.html

Summary
Given a set of locations for two contours (an upper and a lower one), this problems asks us if we can transform one (only vertically) so that it matches the second one.

Explanation
The only way the result is true is the spacing is the same between the two set of points consistently. Which is a complicated way of asking if all the $$\Delta y$$'s are the same.

Input
1

5 2 1 0 -1 1 0 1 0 2 1

Output
yes