#include <bits/stdc++.h>
int main() {
  int time, root, initial[100], repeat[100], store[100], i, min, st;
  scanf("%d %d", &root, &time);
  for (i = 0; i < root; i++) scanf("%d %d", &initial[i], &repeat[i]);
  for (i = 0; i < root; i++) {
    while (time > initial[i]) {
      initial[i] = initial[i] + repeat[i];
    }
    store[i] = initial[i] - time;
  }
  for (i = 0, min = 100000, st = 0; i < root; i++) {
    if (min > store[i]) {
      st = i;
      min = store[i];
    }
  }
  printf("%d\n", st + 1);
  return 0;
}
