QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 64 MB Total points: 100

#11044. Near

统计

A known Polish proverb is: 'The apple always falls near the apple tree'^{1}. Your task is to check this proverb experimentally. For simplicity let us assume that both apple trees and apples stand in one line, so their positions can be described by a single coordinate. Let us also assume that every apple has fallen from the apple tree closest to it.

Write a program that:

  • reads from the standard input a description of positions of apple trees and apples,
  • computes the smallest distance between an apple and its apple tree,
  • writes the result to the standard output.

^{1}An English equivalent of this proverb is: 'Like father, like son' or 'Like mother, like daughter'.

Input Format

The first line of input contains two integers $ n $ and $ m $ ($1 ≤ n, m ≤ 100\,000$), separated with a single space and denoting the number of apple trees and the number of apples. The second line of input contains $ n $ integers from the range $[0,10^{8}]$, separated with single spaces and denoting the coordinates of apple trees. The third line of input contains $ m $ integers from the range $[0,10^{8}]$, separated with single spaces and denoting the coordinates of apples. We treat both apple trees and apples as points on a line; there can be multiple apple trees and multiple apples in one point.

Output Format

The first and only line of output should contain the smallest distance between an apple and its apple tree.

Example

Input

3 5
10 1 4
2 2 5 7 8

Output

1