#include <bits/stdc++.h>
using namespace std;
const int inf = int(1e9);
const int mod = 1e9 + 7;
const int N = (int)2e5 + 5;
void solve() {
  int n, t;
  cin >> n >> t;
  int x[n], y[n];
  int ans = 0;
  int mn = 1e9;
  for (int i = 0; i < n; ++i) {
    cin >> x[i] >> y[i];
    if (x[i] >= t) {
      if (mn > x[i]) {
        mn = min(mn, x[i]);
        ans = i + 1;
      }
    } else {
      int r = t - x[i];
      int z = r / y[i] + (r % y[i] != 0);
      int d = x[i] + z * y[i];
      if (mn > d) {
        mn = d;
        ans = i + 1;
      }
    }
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
