#include<stdio.h>
int main()
{
FILE* in = fopen("dnf.in", "r");
FILE* out = fopen("dnf.out", "w");
int MP=0, Count=0, HP=0;
fscanf(in, "%d%d%d", &MP, &Count, &HP);
int Mcost=0, damage=0;
int flag = 1;
for (int i = 0; i < Count; i++)
{
fscanf(in,"%d%d", &Mcost, &damage);
if (Mcost == 0)
{
fprintf(out, "%d ", i + 1);
flag = 0;
}
else if (MP / Mcost * damage >= HP)
{
fprintf(out, "%d ", i + 1);
flag = 0;
}
}
if (flag)
fprintf(out, "-1");
fclose(out);
fclose(in);
return 0;
}