#include <bits/stdc++.h>
using namespace std;
int n, t, j;
int k1[1000000], k2[1000000], b[1000000], flag[1000000], i, mimn = 99999999, d;
int main() {
  cin >> n >> t;
  for (i = 0; i < n; i++) {
    cin >> k1[i] >> k2[i];
  }
  for (i = 0; i < n; i++) {
    while (k1[i] < t) {
      k1[i] += k2[i];
    }
    if (mimn >= k1[i]) {
      mimn = k1[i];
      d = i;
    }
  }
  cout << d + 1;
  return 0;
}
