#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
i64 t;
i64 bsearch(i64 ok, i64 ng, i64 s, i64 d) {
  while (abs(ok - ng) > 1) {
    i64 mid = (ok + ng) / 2;
    if (s + d * mid >= t)
      ok = mid;
    else
      ng = mid;
  }
  return ok;
}
int main() {
  int n;
  cin >> n >> t;
  vector<pair<i64, i64>> v;
  i64 mini = LLONG_MAX, ans = 0;
  for (int i = 0; i < n; ++i) {
    i64 s, d;
    cin >> s >> d;
    v.emplace_back(s, d);
    i64 m = bsearch(100000, -1, s, d);
    if (mini > s + m * d) {
      mini = s + m * d;
      ans = i + 1;
    }
  }
  cout << ans << endl;
  return 0;
}
