#include <bits/stdc++.h>
using namespace std;
struct pt {
  int x;
  int y;
};
char a[5005][5005];
int main() {
  int n, t, ta, tb;
  cin >> n >> t;
  vector<vector<int>> d(n);
  for (int i = 0; i < n; i++) {
    cin >> ta >> tb;
    d[i].push_back(ta);
    d[i].push_back(tb);
  }
  int mn = INT_MAX, ans = 0;
  for (int i = 0; i < n; i++) {
    ta = d[i][0];
    tb = d[i][1];
    if (ta < t) {
      while (ta < t) {
        ta += tb;
        if (ta >= t) {
          if (ta < mn) {
            mn = ta;
            ans = i;
          }
          break;
        }
      }
    } else {
      if (ta < mn) {
        mn = ta;
        ans = i;
      }
    }
  }
  cout << ans + 1;
  return 0;
}
