#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, t;
  cin >> n >> t;
  long long int diff = LLONG_MAX;
  long long int x, y, ans = 1;
  for (long long int i = 0; i < n; i++) {
    cin >> x >> y;
    if (x >= t && x - t < diff) {
      diff = x - t;
      ans = i + 1;
    } else if (x < t) {
      long long int temp = (t - x) / y + ((t - x) % y != 0 || (t - x) < y);
      if (x + temp * y - t < diff) {
        diff = x + temp * y - t;
        ans = i + 1;
      }
    }
  }
  cout << ans << "\n";
  return 0;
}
