#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;


struct point{
  long long x, y, z;
};

long long len(point a, point b)
{
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}

vector<long long> sum, dst;
vector<int> pts, ans;

bool cmp(int a, int b)
{
  long long b1, b2;
  int i, j;
  i = a - 1;
  j = b - 1;
  b1 = pts[i] * (1 + sum[j]) * dst[j];
  b2 = pts[j] * (1 + sum[i]) * dst[i];
  if(b1 == b2)
    return a < b;
  return b1 > b2;
}

int main()
{
  freopen("basket.in", "r", stdin);
  freopen("basket.out", "w", stdout);
  int n, m; 
  long long l, r;
  cin >> n >> m >> r >> l; 
  vector<point> a(n), e(m);
  for(int i = 0; i < n; i++)
    cin >> a[i].x >> a[i].y, a[i].z = 0;
  for(int i = 0; i < m; i++)
    cin >> e[i].x >> e[i].y >> e[i].z;
  sum.assign(n, 0);
  dst.assign(n, 0);
  pts.assign(n, 2);
  for(int i = 0; i < n; i++)
  {
    dst[i] = a[i].x * a[i].x + a[i].y * a[i].y;
    if(dst[i] > r * r)
      pts[i] = 3;
   	for(int j = 0; j < m;j++)
      if(len(a[i], e[j]) <= l * l)
        sum[i] += e[j].z;
  }
  /*for(int i = 0; i < n; i++)
    cout << sum[i] << ' ';
  cout << endl;
  for(int i = 0; i < n; i++)
    cout << pts[i] << ' ';
  cout << endl;
  for(int i = 0; i < n; i++)
    cout << dst[i] << ' ';
  cout << endl;   */
  ans.assign(n, 0);
  for(int i = 0; i < n; i++)
    ans[i] = i + 1;
  sort(ans.begin(), ans.end(), cmp);
  for(int i = 0; i < n; i++)
    cout << ans[i] << ' ';
  cout << endl;
  return 0;
}
