#include <bits/stdc++.h>
using namespace std;
int a[1 << 20];
int b[1 << 20];
struct line {
  int a, b;
  line(void) { a = b = 0; }
  long long val(int first) { return 1ll * first * a + b; }
  line(int a, int b) : a(a), b(b) {}
};
line* Hull[1 << 20];
int* ans[1 << 20];
int sz[1 << 20];
int inter(line A, line B, line C) {
  return (B.b - C.b) * 1ll * (C.a - A.a) <= (A.b - C.b) * 1ll * (C.a - B.a);
}
void build(int p, int u, int node) {
  if (p == u) {
    sz[node] = 1;
    Hull[node] = new line[2];
    ans[node] = new int[2];
    ans[node][0] = p;
    Hull[node][0] = line(a[p], b[p]);
  } else {
    int m = (p + u) / 2;
    build(p, m, node << 1);
    build(m + 1, u, node << 1 | 1);
    vector<pair<pair<int, int>, int> > A;
    vector<pair<pair<int, int>, int> > B;
    vector<pair<pair<int, int>, int> > C;
    C.resize(sz[node << 1] + sz[node << 1 | 1]);
    for (int i = 0; i < sz[node << 1]; ++i)
      A.push_back(
          make_pair(make_pair(Hull[node << 1][i].a, Hull[node << 1][i].b),
                    ans[node << 1][i]));
    for (int i = 0; i < sz[node << 1 | 1]; ++i)
      B.push_back(make_pair(
          make_pair(Hull[node << 1 | 1][i].a, Hull[node << 1 | 1][i].b),
          ans[node << 1 | 1][i]));
    merge(A.begin(), A.end(), B.begin(), B.end(), C.begin());
    A.clear();
    B.clear();
    vector<pair<line, int> > h;
    for (auto it : C) {
      while (h.size() >= 2 &&
             inter(h[h.size() - 2].first, h[h.size() - 1].first,
                   line(it.first.first, it.first.second)))
        h.pop_back();
      h.push_back(make_pair(line(it.first.first, it.first.second), it.second));
    }
    Hull[node] = new line[h.size() + 1];
    ans[node] = new int[h.size() + 1];
    sz[node] = h.size();
    for (int i = 0; i < sz[node]; ++i)
      Hull[node][i] = h[i].first, ans[node][i] = h[i].second;
    C.clear();
    h.clear();
  }
}
pair<long long, int> get(int who, int v) {
  int p = 0, u = sz[who] - 1;
  while (p < u) {
    int m = (p + u) / 2;
    if (Hull[who][m].val(v) <= Hull[who][m + 1].val(v))
      p = m + 1;
    else
      u = m;
  }
  return make_pair(Hull[who][p].val(v), ans[who][p]);
}
pair<long long, int> query(int p, int u, int l, int r, int t, int node) {
  if (l <= p && u <= r) return get(node, t);
  pair<long long, int> ans = {-1, -1};
  int m = (p + u) / 2;
  if (l <= m) ans = max(ans, query(p, m, l, r, t, node << 1));
  if (m + 1 <= r) ans = max(ans, query(m + 1, u, l, r, t, node << 1 | 1));
  return ans;
}
int main(void) {
  srand(time(0));
  cout << fixed << setprecision(7);
  cerr << fixed << setprecision(7);
  int n, q;
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> q;
  for (int i = 1; i <= n; ++i) cin >> a[i] >> b[i], swap(a[i], b[i]);
  build(1, n, 1);
  while (q--) {
    int l, r, t;
    cin >> l >> r >> t;
    cout << query(1, n, l, r, t, 1).second << '\n';
  }
  cerr << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms"
       << '\n';
  return 0;
}
