#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, t, r = 1000000007, ans, i;
  cin >> n >> t;
  for (i = 1; i <= n; i++) {
    int x, y;
    cin >> x >> y;
    while (x < t) x += y;
    if (x < r) r = x, ans = i;
  }
  cout << ans;
}
int main() {
  long long int t = 1;
  while (t--) solve();
  return 0;
}
