#include <bits/stdc++.h>
using namespace std;
template <typename T>
void view(T e) {
  std::cerr << e << std::endl;
}
template <typename T>
void view(const std::vector<T>& v) {
  for (const auto& e : v) {
    std::cerr << e << " ";
  }
  std::cerr << std::endl;
}
template <typename T>
void view(const std::vector<std::vector<T> >& vv) {
  cerr << endl;
  int cnt = 0;
  for (const auto& v : vv) {
    cerr << cnt << "th : ";
    view(v);
    cnt++;
  }
  cerr << endl;
}
using ll = long long;
const ll mod = 1000000007;
const int inf = 1001001001;
const ll INF = 1001001001001001001ll;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
template <class T, class K>
bool chmax(T& a, const K b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T, class K>
bool chmin(T& a, const K b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
ll rudiv(ll a, ll b) { return a / b + ((a ^ b) > 0 && a % b); }
ll rddiv(ll a, ll b) { return a / b - ((a ^ b) < 0 && a % b); }
ll power(ll a, ll p) {
  ll ret = 1;
  while (p) {
    if (p & 1) {
      ret = ret * a;
    }
    a = a * a;
    p >>= 1;
  }
  return ret;
}
ll modpow(ll a, ll p) {
  ll ret = 1;
  while (p) {
    if (p & 1) {
      ret = ret * a % mod;
    }
    a = a * a % mod;
    p >>= 1;
  }
  return ret;
}
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n, t;
  cin >> n >> t;
  int tmp = inf;
  vector<int> a(n), s(n);
  for (int i = 0; i < n; i++) cin >> a[i] >> s[i];
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] > t) {
      if (chmin(tmp, a[i] - t)) ans = i + 1;
    } else {
      int k = rudiv(t - a[i], s[i]);
      if (chmin(tmp, a[i] + k * s[i] - t)) ans = i + 1;
    }
  }
  cout << ans << endl;
}
