#include <bits/stdc++.h>
using namespace std;
struct Building {
  int a, b;
  int indice;
  long long x1, x2;
  int next;
  int ant;
  bool operator<(const Building &ot) const {
    if (b != ot.b) {
      return b < ot.b;
    }
    return a > ot.a;
  }
} build[100100], buildFixo[100100];
const int pedaco = 320;
int rep[100100];
int res[100100];
int pos[100100];
int l[100100];
int r[100100];
int t[100100];
void update(int bloco, int tempo) {
  while (build[rep[bloco]].x2 < tempo) {
    rep[bloco] = build[rep[bloco]].next;
  }
}
bool cmp(int a, int b) { return t[a] < t[b]; }
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &build[i].a, &build[i].b);
    build[i].indice = i + 1;
    buildFixo[i] = build[i];
  }
  for (int i = 0; i < n;) {
    int j = min(i + pedaco - 1, n - 1);
    sort(build + i, build + j + 1);
    build[i].x1 = 0;
    build[i].x2 = 1000000;
    build[i].next = build[i].ant = -1;
    rep[i] = i;
    int ant, topo;
    topo = i;
    for (int k = i + 1; k <= j; k++) {
      build[k].x2 = 1000000;
      build[k].next = -1;
      build[k].ant = -1;
      ant = topo;
      while (ant != -1) {
        if (build[k].a + build[k].b * build[ant].x1 >=
            build[ant].a + build[ant].b * build[ant].x1) {
          build[k].x1 = build[ant].x1;
          ant = build[ant].ant;
          build[k].ant = ant;
          if (ant != -1) build[ant].next = k;
          topo = k;
        } else {
          if (build[k].a + build[k].b * build[ant].x2 >
              build[ant].a + build[ant].b * build[ant].x2) {
            int xx = (build[ant].a - build[k].a) / (build[k].b - build[ant].b);
            build[ant].x2 = xx;
            build[ant].next = k;
            build[k].ant = ant;
            build[k].x1 = xx + 1;
            topo = k;
          } else {
          }
          break;
        }
      }
      if (ant == -1) {
        rep[i] = k;
        topo = k;
      }
    }
    i = j + 1;
  }
  for (int i = 0; i < q; i++) {
    scanf("%d%d%d", &l[i], &r[i], &t[i]);
    l[i]--;
    r[i]--;
    pos[i] = i;
  }
  sort(pos, pos + q, cmp);
  for (int i = 0; i < q; i++) {
    long long best = 0;
    for (int j = 0; j < n; j) {
      int k = min(j + pedaco - 1, n - 1);
      if (l[pos[i]] <= j && r[pos[i]] >= k) {
        update(j, t[pos[i]]);
        if (build[rep[j]].a + build[rep[j]].b * ((long long)t[pos[i]]) > best) {
          best = build[rep[j]].a + build[rep[j]].b * ((long long)t[pos[i]]);
          res[pos[i]] = build[rep[j]].indice;
        }
      } else if (l[pos[i]] <= k && r[pos[i]] >= j) {
        int ll = max(l[pos[i]], j);
        int rr = min(r[pos[i]], k);
        for (int xx = ll; xx <= rr; xx++) {
          if (buildFixo[xx].a + buildFixo[xx].b * ((long long)t[pos[i]]) >
              best) {
            best = buildFixo[xx].a + buildFixo[xx].b * ((long long)t[pos[i]]);
            res[pos[i]] = xx + 1;
          }
        }
      }
      j = k + 1;
    }
  }
  for (int i = 0; i < q; i++) {
    printf("%d\n", res[i]);
  }
  return 0;
}
