N, M = map(int, input().split()) X = list(map(int, input().split())) Y = list(map(int, input().split())) inf = 10 ** 18 for x in X: ans = inf for y in Y: if y > x: ans = min(ans, y - x) print(ans) if ans <= inf // 2 else print("Infinity")