#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
const int xinc[] = {0, 0, 1, -1};
const int yinc[] = {1, -1, 0, 0};
const long double PI = acos(-1.0);
const double EPS = 1e-9;
int n, t, s, d;
void solve() {
  cin >> n >> t;
  int ans = -1, diff = INT_MAX / 10;
  for (int i = 0; i < n; i++) {
    cin >> s >> d;
    while (s < t) s += d;
    if (s - t < diff) ans = i + 1, diff = s - t;
  }
  cout << ans << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  t = 1;
  while (t--) solve();
  return 0;
}
