### constant

MAX_N = 40
MAX_INT = 1 << 30

### subroutines

def o_prod(v0x, v0y, v1x, v1y)
  v0x * v1y - v0y * v1x
end

### main

n = gets.strip.to_i

pts = n.times.map{|i| gets.strip.split(' ').map{|s| s.to_i} + [i]}
pts.sort!{|a, b| (cmp = a[1] <=> b[1]) != 0 ? cmp : a[0] <=> b[0]}
#p pts

q = gets.strip.to_i

ks = q.times.map{gets.strip.to_i}
#p ks


min_area = n.times.map{n.times.map{n.times.map{n.times.map{MAX_INT}}}}

ppts = n.times.map{n.times.map{n.times.map{n.times.map{nil}}}}

for a in (0...n)
  ax, ay = pts[a]

  for b in ((a + 1)...n)
    bx, by = pts[b]
    abx = bx - ax
    aby = by - ay

    for c in ((a + 1)...n)
      next if b == c

      cx, cy = pts[c]
      acx = cx - ax
      acy = cy - ay

      s = o_prod(abx, aby, acx, acy)
      if s > 0
        min_area[2][a][b][c] = s
        ppts[2][a][b][c] = [a, b, c]
        #p [2, [a, b, c], s]
      end
    end
  end
end

for k in (2...(n - 1))
  for a in (0...n)
    ax, ay = pts[a]

    for b in ((a + 1)...n)
      bx, by = pts[b]

      for c in ((a + 1)...n)
        next if b == c

        cx, cy = pts[c]

        s0 = min_area[k][a][b][c]
        next if s0 >= MAX_INT

        bcx = cx - bx
        bcy = cy - by

        ptsk = ppts[k][a][b][c]

        for i in ((a + 1)...n)
          next if ptsk.include? i

          ix, iy = pts[i]

          cix = ix - cx
          ciy = iy - cy

          next if o_prod(bcx, bcy, cix, ciy) <= 0 ||
            o_prod(cix, ciy, ax - ix, ay - iy) <= 0

          s1 = min_area[2][a][c][i]
          next if s1 >= MAX_INT

          sum = s0 + s1
          if min_area[k + 1][a][c][i] > sum
            min_area[k + 1][a][c][i] = sum
            ppts[k + 1][a][c][i] = ptsk + [i]
          end
        end
      end
    end
  end
end

#p min_area
#p ppts

n3 = n ** 3

for k in ks
  min_ar = MAX_INT
  min_a = min_b = min_c = -1

  for a in (0...n)
    for b in (0...n)
      for c in (0...n)
        ar = min_area[k - 1][a][b][c]
        if min_ar > ar
          min_ar = ar
          min_a = a
          min_b = b
          min_c = c
        end
      end
    end
  end

  if min_ar >= MAX_INT
    puts 'NA'
  else
    pptsk = ppts[k - 1][min_a][min_b][min_c]
    pts0 = pptsk.map{|i| pts[i][2] + 1}
    puts pts0.join(' ')
  end
end