N,M = map(int,input().split()) X = list(map(int,input().split())) Y = list(map(int,input().split())) Y.sort() for i in X: for j in Y: if i < j: print(j-i) break elif Y.index(j) == len(Y)-1: print('Infinity')