#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t, n;
  cin >> n >> t;
  long long s[n], d;
  for (long long i = 0; i < n; i++) {
    cin >> s[i] >> d;
    if (s[i] < t) {
      long long x = t - s[i];
      s[i] = s[i] + ceil((float)x / d) * d;
    }
  }
  long long min = s[0];
  long long index = 0;
  for (long long i = 1; i < n; i++) {
    if (s[i] < min) {
      min = s[i];
      index = i;
    }
  }
  cout << index + 1 << "\n";
}
