n, m = map(int, input().split()) x = list(map(int, input().split())) y = list(map(int, input().split())) for i in x: for j in y: if j - i > 0: print(j - i); break else: print("Infinity")