#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char c;
  for (c = getchar(); !isdigit(c) && c != '-'; c = getchar())
    ;
  if (c == '-') f = -1, c = getchar();
  for (; isdigit(c); c = getchar()) x = (x << 3) + (x << 1) + (c ^ 48);
  return x;
}
int main() {
  int n = read(), t0 = read(), num, min = 1e9;
  for (int i = 1; i <= n; ++i) {
    int t = read(), d = read();
    while (t < t0) t += d;
    if (min > t - t0) {
      min = t - t0;
      num = i;
    }
  }
  cout << num;
}
