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

public class garden_av {

	void solve() throws Exception {
		int n = nextInt();
		long m = nextLong() - 1;
		long h = nextLong();
		long min = Long.MAX_VALUE;
		long max = Long.MIN_VALUE;
		for (int i = 0; i < n; i++) {
			long a = nextLong();
			long b = nextLong();
			long t = a + b * m;
			min = Math.min(min, t);
			max = Math.max(max, t);
		}
		if (min < h) {
			out.print(-1);
		} else {
			if (min == max && min == h)
				out.print(0);
			else
				out.print(1);
		}
	}

	void run() {
		try {
			in = new BufferedReader(new FileReader(filename + ".in"));
			out = new PrintWriter(filename + ".out");
			//			in = new BufferedReader(new InputStreamReader(System.in));
			//			out = new PrintWriter(System.out);

			solve();

			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	BufferedReader in;
	StringTokenizer st;
	PrintWriter out;
	final String filename = new String("Garden").toLowerCase();

	String nextToken() throws Exception {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}

	int nextInt() throws Exception {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws Exception {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws Exception {
		return Double.parseDouble(nextToken());
	}

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

}
