#include <bits/stdc++.h>
int main(void) {
  int preferred_route, current_time, global_time = 1000000, n, t, initial[101],
                                     interval[101];
  scanf("%d %d", &n, &t);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", (initial + i), (interval + i));
    if (*(initial + i) >= t) {
      current_time = *(initial + i);
    } else {
      if ((t - *(initial + i)) % *(interval + i) == 0) {
        printf("%d", i);
        return 0;
      } else {
        current_time =
            t + *(interval + i) - ((t - *(initial + i)) % *(interval + i));
      }
    }
    if (current_time < global_time) {
      global_time = current_time;
      preferred_route = i;
    }
  }
  printf("%d", preferred_route);
  return 0;
}
