#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, hora, bus, d, cont = 1, resul;
  cin >> n;
  cin >> hora;
  pair<long long int, long long int> min(10000000000, 1);
  while (n--) {
    cin >> bus;
    cin >> d;
    long long int act = bus;
    if (act == hora) {
      cout << cont << endl;
      return 0;
    } else if (act < hora) {
      while (act < hora) {
        act = act + d;
        resul = act - hora;
      }
      if (resul < min.first) {
        min.first = resul;
        min.second = cont;
      }
      if (resul == 0) {
        cout << cont << endl;
        return 0;
      }
    } else {
      resul = act - hora;
      if (resul < min.first) {
        min.first = resul;
        min.second = cont;
      }
      if (resul == 0) {
        cout << cont << endl;
        return 0;
      }
    }
    cont++;
  }
  cout << min.second << endl;
  return 0;
}
