#include <bits/stdc++.h>
using namespace std;
int main() {
  pair<long long, long long> Min;
  long long t, n;
  cin >> n >> t;
  for (long long i = 1; i <= n; i++) {
    long long x, y;
    cin >> x >> y;
    if (x == t) {
      Min.second = i;
      Min.first = 0;
    } else if (x > t) {
      if (i != 1)
        Min.first = min(Min.first, x - t);
      else
        Min.first = x - t;
      if (Min.first == x - t) Min.second = i;
    } else {
      long long m = t - x;
      if (m % y == 0)
        m = 0;
      else
        m = y - m % y;
      if (i != 1)
        Min.first = min(Min.first, m);
      else
        Min.first = m;
      if (Min.first == m) Min.second = i;
    }
  }
  cout << Min.second;
}
