Barbells
Your local gym has barbells and plates. In order to prepare a weight for lifting, you must choose a single barbell, which has two sides. You then load each side with a (possibly empty) set of plates. For safety reasons, the plates on each side must sum to the same weight. What weights are available for lifting?
Input
The first line contains the integers and .
The second line contains integers , denoting the weights of the barbells in grams.
The third line contains integers , denoting the weights of the plates in grams.
Output
Print a sorted list of all possible distinct weights in grams, one per line.
Examples
For example, suppose that there are two barbells weighing and grams, and five plates weighting and grams, respectively. Then, there are six possible weights available for lifting.