N,K=map(int,input().split()) assert (1<=N<=1000 and 1<=K<=1000),"NO" C=list(map(int,input().split())) D=list(map(int,input().split())) assert (len(C)==N and len(D)==N),"NO" for i in range(N): assert(1<=C[i]<=1000 and 1<=D[i]<=1000),"NO"