#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, t;
  cin >> n >> t;
  int ar[n], br[n];
  for (int i = 0; i < n; i++) {
    cin >> ar[i] >> br[i];
    while (ar[i] < t) {
      ar[i] += br[i];
    }
  }
  int mn = 1e9, ind = 0;
  for (int i = 0; i < n; i++) {
    if (ar[i] - t < mn) {
      mn = ar[i] - t;
      ind = i;
    }
  }
  cout << ind + 1 << endl;
  return 0;
}
