#include <bits/stdc++.h>
using namespace std;
const int N = 110;
struct Bus {
  int s, d;
} bus[N];
int n, t;
int ans;
int main() {
  int flag = 0;
  cin >> n >> t;
  for (int i = 1; i <= n; i++) {
    cin >> bus[i].s >> bus[i].d;
  }
  int mmin = 1e9;
  for (int i = 1; i <= n; i++) {
    while (bus[i].s < t) {
      bus[i].s += bus[i].d;
    }
    if ((bus[i].s - t) < mmin) {
      mmin = bus[i].s - t;
      ans = i;
    }
  }
  cout << ans << endl;
  return 0;
}
