#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
long long const N = 2e5 + 10;
long long const M = 1010;
long long const MOD = 1e7 + 9;
long double const PI = acos(-1.0);
long long num[N];
long long n, m;
vector<long long> zfunc(string s) {
  long long n = s.length();
  vector<long long> z(n);
  for (long long i = 1, l = 0, r = 0; i < n; i++) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
long long pass(string& str, long long pos) {
  long long len = pos - 1;
  vector<long long> z = zfunc(str);
  long long sum = 0;
  for (long long i = pos; i < str.size() - 1;) {
    if (z[i] == 0) {
      i++;
      len--;
      continue;
    }
    if (z[i] == (str.size() - i)) {
      long long temp = z[i] / 2;
      temp--;
      sum += temp * 3;
      sum += z[i] - 1;
      if (z[i] & 1) sum++;
      break;
    } else {
      long long temp = z[i];
      sum += temp * 3;
      i += z[i];
    }
    len--;
  }
  return sum;
}
vector<pair<long long, long long> > store;
int32_t main() {
  long long n, t;
  cin >> n >> t;
  for (long long i = 1; i <= n; i++) {
    long long a, d;
    cin >> a >> d;
    if (a >= t) {
      store.push_back({a, i});
    } else {
      long long t1 = t - a;
      t1 = (t1 / d) + bool(t1 % d);
      long long time = a + (t1 * d);
      store.push_back({time, i});
    }
  }
  sort((store.begin()), (store.end()));
  cout << store[0].second << endl;
}
