#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e5 + 5;
long long n, t;
struct node {
  long long s, d, num;
} ff[maxn];
bool cmp(node a, node b) { return a.s < b.s; }
int main() {
  cin >> n >> t;
  for (long long i = 0; i < n; i++) {
    cin >> ff[i].s >> ff[i].d;
    ff[i].num = i + 1;
    if (ff[i].s >= t) continue;
    long long cc = t - ff[i].s, zz = 0;
    if (cc % ff[i].d == 0) {
      zz = cc / ff[i].d;
    } else {
      zz = cc / ff[i].d + 1;
    }
    ff[i].s += (zz * ff[i].d);
  }
  sort(ff, ff + n, cmp);
  cout << ff[0].num << endl;
  return 0;
}
