#include <bits/stdc++.h>
using namespace std;
int N, T;
int main() {
  int i, j, s, d, tt, x;
  cin >> N >> T;
  tt = (int)1e6;
  for (i = 1; i <= N; i++) {
    cin >> s >> d;
    for (j = s; j < T; j += d)
      ;
    if (j <= tt) tt = j, x = i;
  }
  cout << x << endl;
}
