#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 + 10;
int n, t, s[MAXN], d[MAXN];
int minn = 1e9, idx = 1;
int main(void) {
  scanf("%d%d", &n, &t);
  for (int i = 1; i <= n; i++) {
    scanf("%d", s + i);
    scanf("%d", d + i);
    while (s[i] < t) s[i] += d[i];
    if (s[i] < minn) {
      idx = i;
      minn = s[i];
    }
  }
  printf("%d\n", idx);
}
