#include <bits/stdc++.h>
using namespace std;
int n, d, x, y;
int main() {
  int ans = 2147483647, flag;
  cin >> n >> d;
  for (int i = 1; i <= n; i++) {
    cin >> x >> y;
    for (int k = 1; x < d; k++) x += y;
    if (x - d < ans) {
      flag = i;
      ans = x - d;
    }
  }
  cout << flag;
  return 0;
}
