n,m = map(int,input().split()) x = list(map(int,input().split())) y = list(map(int,input().split())).sort for i in x: for j in y: if i