#include <bits/stdc++.h>
const unsigned int M = 1000000007;
using namespace std;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = x * res;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
void nik() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
signed main() {
  nik();
  long long t = 1;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    std::vector<pair<long long, long long>> v;
    for (long long i = 0; i < n; i++) {
      long long a, b;
      cin >> a >> b;
      while (a < k) a += b;
      v.push_back({a, i});
    }
    sort((v).begin(), (v).end());
    cout << v[0].second + 1;
  }
  return 0;
}
