#include <bits/stdc++.h>
using namespace std;
bool prime(long long x) {
  for (long long i = 2; i * i <= x; i++) {
    if (x % i == 0) return false;
  }
  return x > 1;
}
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long lcm(long long x, long long y) { return x * y / gcd(x, y); }
long long kai(long long x) {
  if (x == 0) return 1;
  return kai(x - 1) * x % (long long)(1e9 + 7);
}
long long mod_pow(long long x, long long y, long long mod) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) {
      res = res * x % mod;
    }
    x = x * x % mod;
    y >>= 1;
  }
  return res;
}
long long comb(long long x, long long y) {
  return kai(x) *
         mod_pow(kai(x - y), (long long)(1e9 + 7) - 2, (long long)(1e9 + 7)) %
         (long long)(1e9 + 7) *
         mod_pow(kai(y), (long long)(1e9 + 7) - 2, (long long)(1e9 + 7)) %
         (long long)(1e9 + 7);
}
long long n, t;
long long a[114], b[114], mi = (long long)(3e18 + 7), ans;
signed main() {
  cin >> n >> t;
  for (long long i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    long long c;
    if (a[i] >= t)
      c = a[i];
    else
      c = a[i] + (t - a[i] + b[i] - 1) / b[i] * b[i];
    if (c < mi) {
      mi = c;
      ans = i;
    }
  }
  cout << ans + 1 << endl;
}
