#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005], i, j, m, n, t;
int main() {
  while (cin >> n >> t) {
    int min = 100000000;
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    for (i = 0; i < n; i++) {
      scanf("%d %d", &a[i], &b[i]);
    }
    for (i = 0; i < n; i++) {
      while (a[i] < t) {
        a[i] += b[i];
      }
      if (min > a[i]) {
        min = a[i];
        m = i;
      }
    }
    cout << m + 1 << endl;
  }
  return 0;
}
