#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, t, k, j, min;
  cin >> n >> t;
  for (i = 1; i < n + 1; i++) {
    int a, b, temp;
    cin >> a >> b;
    temp = a;
    while (temp < t) {
      temp = temp + b;
    }
    if (temp == t) {
      cout << i;
      return 0;
    }
    if (i == 0) {
      min = temp;
    }
    if (temp < min) {
      min = temp;
      m = i;
    }
  }
  cout << m;
  return 0;
}
