#include <bits/stdc++.h>
int main() {
  int n, t, first, second, index = 0;
  int mn = INT_MAX, temp, sum;
  scanf("%d%d", &n, &t);
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d", &first, &second);
    if (first >= t && first < mn) {
      mn = first;
      index = i;
    } else if (first < t) {
      temp = t - first;
      if (temp % second) {
        sum = ((temp / second) * second) + second;
        sum += first;
      } else {
        sum = (temp / second) * second;
        sum += first;
      }
      if (sum < mn) {
        mn = sum;
        index = i;
      }
    }
  }
  printf("%d\n", index);
  return 0;
}
