#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, s[200005], d[200005], k;
  while (cin >> n >> t) {
    int maxx = 0x3f3f3f3f;
    for (int i = 1; i <= n; i++) {
      cin >> s[i] >> d[i];
      int change = s[i];
      while (change < t) {
        change += d[i];
      }
      if (change - t < maxx) {
        maxx = change - t;
        k = i;
      }
    }
    cout << k << endl;
  }
}
