#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  cin >> n >> t;
  bool check[n + 1];
  int bus[n + 1], time[n + 1];
  for (int i = 0; i < n; i++) {
    cin >> bus[i] >> time[i];
    if (bus[i] < t)
      check[i] = false;
    else
      check[i] = true;
  }
  for (int i = 0; i < n; i++) {
    if (check[i] == false) {
      while (bus[i] < t) bus[i] += time[i];
    }
  }
  int ans = 1, min_time = bus[0];
  for (int i = 1; i < n; i++) {
    if (min_time > bus[i]) min_time = bus[i], ans = i + 1;
  }
  cout << ans << endl;
  return 0;
}
