a = list(map(int,input().split(" ")))
br = []
cr = []
for i in range(a[0]):
    l = list(map(int,input().split(" ")))
    br.append(l)
for j in range(a[1]):
    m = list(map(int,input().split(" ")))
    cr.append(m)
count = 10 ** 8
inde = 0
for b in br:
    for k,c in enumerate(cr):
        d = abs(b[0]-c[0]) + abs(b[1]-c[1])
        if d < count:
            count = d
    for l,c in enumerate(cr):
        if count == abs(b[0]-c[0]) + abs(b[1]-c[1]):
            print(l+1)
            break