import java.io.*;
import java.util.*;

public class basket_vd {

	public void solve() throws IOException {
		int n = nextInt();
		int m = nextInt();
		long r = nextLong();
		long l = nextLong();
		long[] x = new long[n];
		long[] y = new long[n];
		for (int i = 0; i < n; i++) {
			x[i] = nextLong();
			y[i] = nextLong();
		}
		long[] x1 = new long[m];
		long[] y1 = new long[m];
		long[] z1 = new long[m];
		for (int i = 0; i < m; i++) {
			x1[i] = nextLong();
			y1[i] = nextLong();
			z1[i] = nextLong();
		}
		long[] sumZ = new long[n];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				if ((x[i] - x1[j]) * (x[i] - x1[j]) + (y[i] - y1[j])
						* (y[i] - y1[j]) <= l * l) {
					sumZ[i] += z1[j];
				}
			}
		}
		final double[] frac = new double[n];
		for (int i = 0; i < n; i++) {
			double p = 0;
			if (x[i] * x[i] + y[i] * y[i] > r * r) {
				p += 3;
			} else {
				p += 2;
			}
			double d2 = (Math.abs(Math.sqrt(x[i] * x[i] + y[i] * y[i])));
			d2 = d2 * d2;
			frac[i] = 1.0 * p / (1.0 + sumZ[i]);			
			frac[i] = frac[i] / d2;
		}
		final Integer[] a = new Integer[n];
		for (int i = 0; i < n; i++) {
			a[i] = i;
		}
		Arrays.sort(a, new Comparator<Integer>() {
			@Override
			public int compare(Integer arg0, Integer arg1) {
				if (frac[arg0] - frac[arg1] < 1e-9) {
					return 0;
				}
				return Double.compare(frac[arg1], frac[arg0]);
			}
		});
//		System.err.println(Arrays.toString(a));
		for (int i = 0; i < n - 1; i++) {
			out.print(a[i] + 1 + " ");
		}
		out.println(a[n - 1] + 1);
	}

	final String fileName = "basket_vd_".split("_")[0];

	public void run() throws IOException {
		br = new BufferedReader(new FileReader(fileName + ".in"));
		out = new PrintWriter(fileName + ".out");
		solve();
		out.close();
		br.close();
	}

	public static void main(String[] args) throws IOException {
		new basket_vd().run();
	}

	BufferedReader br;
	StringTokenizer str;
	PrintWriter out;

	String next() throws IOException {
		while (str == null || !str.hasMoreTokens()) {
			str = new StringTokenizer(br.readLine());
		}
		return str.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

}