#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int s[maxn], d[maxn];
int main() {
  int n, t;
  scanf("%d%d", &n, &t);
  for (int i = 0; i < n; i++) scanf("%d%d", &s[i], &d[i]);
  int ans = 0, Min = INT_MAX;
  for (int i = 0; i < n; i++) {
    int sub = t - s[i];
    if (sub <= 0)
      sub = -sub;
    else
      sub = ((sub - 1) / d[i] + 1) * d[i] + s[i] - t;
    if (sub < Min) Min = sub, ans = i + 1;
  }
  printf("%d\n", ans);
}
