#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, i, j;
  while (~scanf("%d %d", &n, &t)) {
    int a[100002], b[10002], max = 1000000, c;
    for (i = 0; i < n; i++) {
      j = 0;
      scanf("%d %d", &a[i], &b[i]);
      while (a[i] + b[i] * j < t) {
        if (a[i] + b[i] * j < t) j++;
      }
      if (a[i] + b[i] * j - t < max) {
        max = a[i] + b[i] * j - t;
        c = i + 1;
      }
    }
    printf("%d\n", c);
  }
  return 0;
}
