#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, s, d;
  cin >> n >> t;
  pair<int, int> G[n];
  for (int i = 0; i < n; i++) {
    cin >> s >> d;
    G[i].first = s;
    G[i].second = d;
  }
  int indx = 0, SUM = 0, mini = INFINITY;
  for (int i = 0; i < n; i++) {
    int rec = G[i].second;
    SUM = G[i].first;
    while (t > SUM) {
      SUM += rec;
    }
    int ans = SUM - t;
    if (ans <= mini) {
      mini = ans;
      indx = i;
    }
  }
  cout << (indx + 1) << "\n";
  return 0;
}
