#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long lld;
const int N=100005;
int n,q,Lt;
int a[N],b[N];
int List[N];
struct Node{
int l,r;
Node *lc,*rc;
vector <int> L;
}Tr[N*6];
bool cmp(int i,int j){
if (a[i]>a[j]) return true;
if (a[i]<a[j]) return false;
return b[i]>b[j];
}
void Select(){
int tmp=Lt;
Lt=0;
List[Lt++]=List[0];
for (int i=1;i<tmp;i++){
if (b[List[i]]<=b[List[Lt-1]]) continue;
List[Lt++]=List[i];
}
}
void Form(){
int tmp=Lt;
Lt=0;
List[Lt++]=List[0];
#define x List[i]
#define y List[Lt-1]
#define z List[Lt-2]
for (int i=1;i<tmp;i++){
while (Lt>1 && (lld)(a[x]-a[y])*(b[z]-b[y])<=(lld)(a[y]-a[z])*(b[y]-b[x])) Lt--;
List[Lt++]=List[i];
}
#undef x
#undef y
#undef z
}
void Make(Node *p){
Lt=0;
for (int i=p->l;i<=p->r;i++)
List[Lt++]=i;
sort(List,List+Lt,cmp);
Select();
Form();
p->L.resize(Lt);
for (int i=0;i<Lt;i++)
p->L[i]=List[i];
}
void build(int p,int l,int r){
Tr[p].l=l; Tr[p].r=r; Tr[p].L.clear(); Make(&Tr[p]);
if (l==r){
Tr[p].lc=Tr[p].rc=NULL;
return;
}
Tr[p].lc=&Tr[p*2];
Tr[p].rc=&Tr[p*2+1];
build(p*2,l,(l+r)/2);
build(p*2+1,(l+r)/2+1,r);
}
int Get_Best(vector<int> &L,lld t){
int S=L.size();
int l=0,r=S-1,mid;
while (l<r){
mid=(l+r)/2;
if (a[L[mid]]+t*b[L[mid]]<=a[L[mid+1]]+t*b[L[mid+1]])
l=mid+1;
else
r=mid;
}
return L[l];
}
int Get_Max(int i,int j,lld t){
if (a[i]+t*b[i]>a[j]+t*b[j]) return i;
return j;
}
int Get_value(Node *p,int l,int r,int t){
if (l<=p->l && p->r<=r)
return Get_Best(p->L,t);
int mid=(p->l+p->r)/2;
if (l<=mid && r>mid) return Get_Max(Get_value(p->lc,l,r,t),Get_value(p->rc,l,r,t),t);
if (l<=mid) return Get_value(p->lc,l,r,t);
else return Get_value(p->rc,l,r,t);
}
int main(){
scanf("%d%d",&n,&q);
for (int i=1;i<=n;i++)
scanf("%d%d",&a[i],&b[i]);
build(1,1,n);
int l,r,t;
for (int i=0;i<q;i++){
scanf("%d%d%d",&l,&r,&t);
printf("%d\n",Get_value(&Tr[1],l,r,t));
}
}
I2luY2x1ZGUgPGNzdGRpbz4KI2luY2x1ZGUgPGNzdHJpbmc+CiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPHZlY3Rvcj4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdHlwZWRlZiBsb25nIGxvbmcgbGxkOwpjb25zdCBpbnQgTj0xMDAwMDU7CmludCBuLHEsTHQ7CmludCBhW05dLGJbTl07CmludCBMaXN0W05dOwpzdHJ1Y3QgTm9kZXsKICAgIGludCBsLHI7CiAgICBOb2RlICpsYywqcmM7CiAgICB2ZWN0b3IgPGludD4gTDsKfVRyW04qNl07Cgpib29sIGNtcChpbnQgaSxpbnQgail7CiAgICBpZiAoYVtpXT5hW2pdKSByZXR1cm4gdHJ1ZTsKICAgIGlmIChhW2ldPGFbal0pIHJldHVybiBmYWxzZTsKICAgIHJldHVybiBiW2ldPmJbal07Cn0KCnZvaWQgU2VsZWN0KCl7CiAgICBpbnQgdG1wPUx0OwogICAgTHQ9MDsKICAgIExpc3RbTHQrK109TGlzdFswXTsKICAgIGZvciAoaW50IGk9MTtpPHRtcDtpKyspewogICAgICAgIGlmIChiW0xpc3RbaV1dPD1iW0xpc3RbTHQtMV1dKSBjb250aW51ZTsKICAgICAgICBMaXN0W0x0KytdPUxpc3RbaV07CiAgICB9Cn0KCnZvaWQgRm9ybSgpewogICAgaW50IHRtcD1MdDsKICAgIEx0PTA7CiAgICBMaXN0W0x0KytdPUxpc3RbMF07CiAgICAjZGVmaW5lIHggTGlzdFtpXQogICAgI2RlZmluZSB5IExpc3RbTHQtMV0KICAgICNkZWZpbmUgeiBMaXN0W0x0LTJdCiAgICBmb3IgKGludCBpPTE7aTx0bXA7aSsrKXsKICAgICAgICB3aGlsZSAoTHQ+MSAmJiAobGxkKShhW3hdLWFbeV0pKihiW3pdLWJbeV0pPD0obGxkKShhW3ldLWFbel0pKihiW3ldLWJbeF0pKSBMdC0tOwogICAgICAgIExpc3RbTHQrK109TGlzdFtpXTsKICAgIH0KICAgICN1bmRlZiB4CiAgICAjdW5kZWYgeQogICAgI3VuZGVmIHoKfQoKdm9pZCBNYWtlKE5vZGUgKnApewogICAgTHQ9MDsKICAgIGZvciAoaW50IGk9cC0+bDtpPD1wLT5yO2krKykKICAgICAgTGlzdFtMdCsrXT1pOwogICAgc29ydChMaXN0LExpc3QrTHQsY21wKTsKICAgIFNlbGVjdCgpOwogICAgRm9ybSgpOwogICAgcC0+TC5yZXNpemUoTHQpOwogICAgZm9yIChpbnQgaT0wO2k8THQ7aSsrKQogICAgICBwLT5MW2ldPUxpc3RbaV07Cn0KCnZvaWQgYnVpbGQoaW50IHAsaW50IGwsaW50IHIpewogICAgVHJbcF0ubD1sOyBUcltwXS5yPXI7IFRyW3BdLkwuY2xlYXIoKTsgTWFrZSgmVHJbcF0pOwogICAgaWYgKGw9PXIpewogICAgICAgIFRyW3BdLmxjPVRyW3BdLnJjPU5VTEw7CiAgICAgICAgcmV0dXJuOwogICAgfQogICAgVHJbcF0ubGM9JlRyW3AqMl07CiAgICBUcltwXS5yYz0mVHJbcCoyKzFdOwogICAgYnVpbGQocCoyLGwsKGwrcikvMik7CiAgICBidWlsZChwKjIrMSwobCtyKS8yKzEscik7Cn0KCmludCBHZXRfQmVzdCh2ZWN0b3I8aW50PiAmTCxsbGQgdCl7CiAgICBpbnQgUz1MLnNpemUoKTsKICAgIGludCBsPTAscj1TLTEsbWlkOwogICAgd2hpbGUgKGw8cil7CiAgICAgICAgbWlkPShsK3IpLzI7CiAgICAgICAgaWYgKGFbTFttaWRdXSt0KmJbTFttaWRdXTw9YVtMW21pZCsxXV0rdCpiW0xbbWlkKzFdXSkKICAgICAgICAgICAgbD1taWQrMTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIHI9bWlkOwogICAgfQogICAgcmV0dXJuIExbbF07Cn0KCmludCBHZXRfTWF4KGludCBpLGludCBqLGxsZCB0KXsKICAgIGlmIChhW2ldK3QqYltpXT5hW2pdK3QqYltqXSkgcmV0dXJuIGk7CiAgICByZXR1cm4gajsKfQoKaW50IEdldF92YWx1ZShOb2RlICpwLGludCBsLGludCByLGludCB0KXsKICAgIGlmIChsPD1wLT5sICYmIHAtPnI8PXIpCiAgICAgICAgcmV0dXJuIEdldF9CZXN0KHAtPkwsdCk7CiAgICBpbnQgbWlkPShwLT5sK3AtPnIpLzI7CiAgICBpZiAobDw9bWlkICYmIHI+bWlkKSByZXR1cm4gR2V0X01heChHZXRfdmFsdWUocC0+bGMsbCxyLHQpLEdldF92YWx1ZShwLT5yYyxsLHIsdCksdCk7CiAgICBpZiAobDw9bWlkKSByZXR1cm4gR2V0X3ZhbHVlKHAtPmxjLGwscix0KTsKICAgICAgICAgICBlbHNlIHJldHVybiBHZXRfdmFsdWUocC0+cmMsbCxyLHQpOwp9CgppbnQgbWFpbigpewogICAgc2NhbmYoIiVkJWQiLCZuLCZxKTsKICAgIGZvciAoaW50IGk9MTtpPD1uO2krKykKICAgICAgICBzY2FuZigiJWQlZCIsJmFbaV0sJmJbaV0pOwogICAgYnVpbGQoMSwxLG4pOwogICAgaW50IGwscix0OwogICAgZm9yIChpbnQgaT0wO2k8cTtpKyspewogICAgICAgIHNjYW5mKCIlZCVkJWQiLCZsLCZyLCZ0KTsKICAgICAgICBwcmludGYoIiVkXG4iLEdldF92YWx1ZSgmVHJbMV0sbCxyLHQpKTsKICAgIH0KfQ==