#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, t, arr, d, ans = 0, mini = 1e9, m, i, j, hash[100005] = {0}, x,
                          y;
  cin >> n >> t;
  for (i = 0; i < n; i++) {
    cin >> arr >> d;
    if (t - arr < 0) {
      y = arr;
    } else {
      x = ((t - arr) / d + ((t - arr) % d != 0));
      y = d * x + arr;
    }
    if (mini > y) {
      mini = y;
      ans = i + 1;
    }
    x = 0;
    y = 0;
  }
  cout << ans << "\n";
  return 0;
}
