#include <bits/stdc++.h>
using namespace std;
int N, T, S, D, ANS = -1, BST = 1e9;
int main() {
  scanf("%d %d", &N, &T);
  for (int i = 0; i < N; i++) {
    scanf("%d %d", &S, &D);
    while (S < T) S += D;
    if (S < BST) {
      BST = S, ANS = i + 1;
    }
  }
  printf("%d\n", ANS);
}
