package main

import "fmt"

type Point struct {
	x int
	y int
}

const max = 10000000001

func myAbs(a int, b int) (c int) {
	c = a - b
	if c < 0 {
		return -c
	} else {
		return c
	}
}

func man(p Point, q Point) int {
	return myAbs(q.x, p.x) + myAbs(p.y, q.y)
}

func main() {
	var n, m int
	fmt.Scan(&n, &m)
	s := make([]Point, n)
	for i:=0; i<n; i++ {
		fmt.Scan(&s[i].x, &s[i].y)
	}
	c := make([]Point, n)
	for i:=0; i<n; i++ {
		fmt.Scan(&c[i].x, &c[i].y)
	}
	for _, p := range s {
		min_p := 1
		min := max
		for i, q := range c {
			t := man(p, q)
			if min > t {
				min_p = i
				min = t
			}
		}
		fmt.Println(min_p + 1)
	}

}
