#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <complex>
#include <cfloat>
using namespace std;

typedef complex<double> P;
typedef const P &rP;

#define EPS 1e-7

double eq(double a, double b){
	return abs(a - b) < EPS;
}

double dot(rP a, rP b){
	return a.real() * b.real() + a.imag() * b.imag();
}

double cross(rP a, rP b){
	return a.real() * b.imag() - b.real() * a.imag();
}


double distc2(rP v, rP p, double rp, rP q, double rq){
	P d = q - p;
	rp += rq;
	double a = norm(v);
	double b = dot(v, d);
	double c = norm(d) - rp * rp;

	double D = b * b - a * c;
	if( D < 0.0 ){
		return DBL_MAX;
	}
	double t = (b - sqrt(D)) / a;
	if(t > EPS){
		return abs(v) * t;
	}
	t = (b + sqrt(D)) / a;
	if(t > EPS){
		return abs(v) * t;
	}
	return DBL_MAX;
}


double intersectSS(rP pa1, rP pa2, rP pb1, rP pb2){
	P da12 = pa2 - pa1;
	P db21 = pb1 - pb2;
	P dab1 = pb1 - pa1;
	double D = cross(da12, db21);
	if( abs(D) > EPS ){
		double t = cross(dab1, db21) / D;
		double s = cross(da12, dab1) / D;
		if( EPS < t && (-EPS < s && s < 1.0 + EPS) ){
			return t;
		}
	}
	return DBL_MAX;
}

int n;
double w, h, r, vx, vy, x, y;
P ball[11], wall[5], v;

int solve(){
	wall[0] = wall[4] = P(r, r);
	wall[1] = P(w - r, r);
	wall[2] = P(w - r, h - r);
	wall[3] = P(r, h - r);

	double t[4];
	double w[4];

	double s = 1e4;
	while(s > 0.0){
		v = P(vx, vy);
		v /= abs(v);

		double wmin = DBL_MAX;
		int windex = -1;
		for(int i = 0; i < 4; ++i){
			t[i] = intersectSS(ball[0], ball[0] + v, wall[i], wall[i+1]);
			w[i] = abs(v) * t[i];
			if( wmin > w[i] ){
				wmin = w[i];
				windex = i;
			}
		}

		double dmin = DBL_MAX;
		int dindex = -1;
		for(int i = 1; i < n; ++i){
			double d = distc2(v, ball[0], r, ball[i], r);
			if( dmin > d ){
				dmin = d;
				dindex = i + 1;
			}
		}

		if( dmin < wmin ){
			s -= dmin;
			if( s < 0.0 ) return -1;
			return dindex;
		}
		else{
			s -= wmin;
			if( s < 0.0 ) return -1;

			P next = ball[0] + v * t[windex];

			int f = 0;
			for(int i = 0; i < 4; ++i){
				if( eq(wmin, w[i]) ){
					if( i & 1 ){
						vx = -vx;
					}
					else{
						vy = -vy;
					}
				}
			}

			ball[0] = next;
		}
	}

	return -1;
}


int main(){
	while( cin >> n >> w >> h >> r >> vx >> vy ){
		for(int i = 0; i < n; ++i){
			cin >> x >> y;
			ball[i] = P(x, y);
		}
		
		cout << solve() << '\n';
	}
}