#include <bits/stdc++.h>
using namespace std;
int arr[128];
int S[128], T[128];
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  for (register int i = 0; i < n; i++) cin >> S[i] >> T[i];
  for (register int i = 0; i < n; i++) {
    arr[i] = S[i];
    while (arr[i] < k) arr[i] += T[i];
  }
  int minn = INT_MAX, pos;
  for (register int i = 0; i < n; i++) {
    if (minn > arr[i] - k) {
      minn = arr[i] - k;
      pos = i;
    }
  }
  printf("%d\n", pos + 1);
  return 0;
}
