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

public class garden_vd {
	BufferedReader in;
	StringTokenizer str;
	PrintWriter out;
	String SK;

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

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

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

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

	void solve() throws IOException {
		int n=nextInt();
		long m=nextInt();
		long h=nextLong();
		int res=0;
		for (int i=0; i<n; i++)
		{
			long x1=nextLong();
			long y1=nextLong();
			if (x1+y1*(m-1)<h)
			{
				out.println("-1");
				return;
			}
			if (x1+y1*(m-1)>h)
				res=1;
		}
		out.println(res);
	};

	void run() throws IOException {

		in = new BufferedReader(new FileReader("garden.in"));
		out = new PrintWriter("garden.out");
		solve();
		out.close();
	}

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

}
