N, M = map(int, input().split())
a, b = [], []
for _ in range(N):
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)
    
c, d = [], []
for _ in range(N):
    C, D = map(int, input().split())
    c.append(C)
    d.append(D)
    
for A, B in zip(a, b):
    ans = 0
    mn = 10**9
    for i, (C, D) in enumerate(zip(c, d)):
        s = abs(A - C) + abs(B - D)
        if mn > s:
            ans = i
            mn = s
            
    print(ans+1)