Apples and Apple Trees

No attempts yetTime limit1sMemory limit128 MB

Problem

There is a well-known Polish proverb: "An apple always falls near the apple tree." Let us verify this proverb experimentally.

To keep things simple, assume that all apple trees and apples lie on a single line, so each position can be described by a single coordinate. Assume also that every apple fell from the apple tree closest to it.

For each apple you can consider the distance to the tree it fell from (that is, to the nearest apple tree). Write a program that:

  • reads the positions of the apple trees and the apples from standard input,
  • computes the smallest of these distances over all apples,
  • writes the result to standard output.

(An English equivalent of this proverb is "Like father, like son" or "Like mother, like daughter.")

Input

The first line contains two integers nn and mm (1n,m1000001 \le n, m \le 100\,000), separated by a single space, denoting the number of apple trees and the number of apples.

The second line contains nn integers, separated by single spaces, giving the coordinates of the apple trees. Each coordinate is an integer in the range [0,108][0, 10^8].

The third line contains mm integers, separated by single spaces, giving the coordinates of the apples. Each coordinate is an integer in the range [0,108][0, 10^8].

Both apple trees and apples are treated as points on a line, and several apple trees or several apples may share the same point.

Output

Output a single line containing the smallest distance between an apple and the apple tree closest to it.