#include<bits/stdc++.h>
using namespace std;
int a[10005],b[10005],c = 0;
short m,n,sss;
int main(){
cin >> m >> n >> sss;
for(int i = 1; i <= n; i++){
cin >> a[i] >> b[i];
}
for(int i = 1; i <= n; i++){
if(sss - m / a[i] * b[i] <= 0) cout<< i << " " ;
else c++;
}
if(c == n) cout<< "-1" ;
return 0;
}