N,D=map(int,input().split()) x=list(map(int,input().split())) v=list(map(int,input().split())) f=sum(v) memo=0 t=0 while memo