### constant

MAX_F = 1.0e20

### subroutines

def catch(fb, dg)
  ## pt = t * fbv + fbp = (t * fbvx + fbpx, t * fbvy + fbpy)
  ## |pt - dgp| = t * dgv
  ## (t * fbvx + fbpx - dgpx) ^ 2 + (t * fbvy + fbpy - dgpy) ^ 2 = t^2 * dgv^2
  ## (fbvx^2 + fbvy^2 - dgv^2) * t^2 +
  ## 2 * (fbvx * (fbpx - dgpx) + fbvy * (fbpy - dgpy)) * t +
  ## (fbpx - dgpx)^2 + (fbpy - dgpy)^2 = 0

  a = fb[2] ** 2 + fb[3] ** 2 - dg[2] ** 2
  b = 2 * (fb[2] * (fb[0] - dg[0]) + fb[3] * (fb[1] - dg[1]))
  c = (fb[0] - dg[0]) ** 2 + (fb[1] - dg[1]) ** 2

  d = b ** 2 - 4 * a * c
  return [nil, nil, nil] if d < 0.0

  sd = Math.sqrt(d)
  t0 = (-b + sd) / (2 * a)
  t1 = (-b - sd) / (2 * a)

  return [nil, nil, nil] if t0 < 0.0 && t1 < 0.0

  t = nil
  if t0 < 0.0
    t = t1
  elsif t1 < 0.0
    t = t0
  else
    t = (t0 < t1) ? t0 : t1
  end

  dgvx = (t == 0.0 ? 0.0 : (fb[2] * t + fb[0] - dg[0]) / t)
  dgvy = (t == 0.0 ? 0.0 : (fb[3] * t + fb[1] - dg[1]) / t)

  [t, dgvx, dgvy]
end

### main

loop do
  n, m = gets.split.map(&:to_i)
  break if n == 0 && m == 0

  dogs = []
  n.times do
    dogs << gets.split.map(&:to_f)
  end
  #p dogs

  frbs = []
  m.times do
    frbs << gets.split.map(&:to_f)
  end
  #p frbs

  catches = n.times.map{0}

  for frb in frbs
    min_t = MAX_F
    min_i = -1
    ts = []

    for i in (0...n)
      ti = catch(frb, dogs[i])
      ts << ti
      if ! ti[0].nil? && min_t > ti[0]
        min_t = ti[0]
        min_i = i
      end
    end
    #p [min_t, min_i]

    catches[min_i] += 1

    for i in (0...n)
      ti = ts[i]
      if ! ti[0].nil?
        dogs[i][0] += ti[1] * min_t
        dogs[i][1] += ti[2] * min_t
      end
    end    
  end

  puts catches.join(' ')
end