N, M = map(int, input().split())
ab = [input().split() for a in range(M)]
cd = [input().split() for a in range(M)]


for y in range(M):
    min_p = 999
    point = 1
    for x in range(M):
        distance = abs(int(ab[y][0]) - int(cd[x][0])) + abs(int(ab[y][1]) - int(cd[x][1]))
        if min_p == distance:
            continue
        elif min_p > distance:
            min_p = distance
            point += 1
    print(point)