
type int = longint;

var n,a,b,i,ans:int;
	y,h:integer;


begin
	reset(input,'garden.in');
	rewrite(output,'garden.out');
	read(n,y,h);
	dec(y);
	ans := 0;
	for i:= 1 to n do
	begin
		read(a,b);
		if (a+y*b < h) then
		begin
			write(-1);
			close(input);
			close(output);
			halt(0);
		end;
		if (a+y*b > h) then
			ans := 1;	
	end;
	write(ans);
	close(input);
	close(output);
end.