#include <bits/stdc++.h>
using namespace std;
template <class T>
T GCD(T a, T b) {
  return (b != 0 ? GCD<T>(b, a % b) : a);
}
template <class T>
T LCM(T a, T b) {
  return ((a * b) / GCD<T>(a, b));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, t, s, d, mx = 1e9, ans, val, val2;
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    cin >> s >> d;
    if (s >= t) {
      if (s < mx) {
        mx = s;
        ans = i + 1;
      }
    } else {
      val2 = t - s;
      val = val2 / d;
      if (val2 % d) val++;
      val2 = (val * d) + s;
      if (val2 < mx) {
        mx = val2;
        ans = i + 1;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
