Problem 1: Cast out duplicate integers.

The input file will contain integers, two per line, with one
blank between the two numbers.

The two numbers are to be treated a belonging to two arrays,
say left and right.  

The numbers will be greater than or equal to 0, and less than
or equal to 32767.  There will be fewer than five hundred pairs
of numbers.

The last record will contain
-1 -1

Print, one per line, in ascending order, those numbers which appear 
in both the left-array and the right-array.  Print a particular 
number only once, even though it may appear in an array more than once.

Example:

9743 3
3 6555
21 48
3 29
19 9743
-1 -1

For the example, the correct output will be
3
9743
