N,K = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) C = sorted([(i,A[i]-B[i]) for i in range(N)],key=lambda x:-x[1]) S = [0]*N ans = 0 for i in range(N): if i