#include <bits/stdc++.h>
using namespace std;
int n;
int chil;
struct buss {
  int first;
  int t;
} bus[105];
int flag = 0;
int tot[105];
int main() {
  cin >> n;
  cin >> chil;
  for (int i = 1; i <= n; i++) {
    cin >> bus[i].first >> bus[i].t;
  }
  for (int i = 1; i <= n; i++) {
    tot[i] += bus[i].first;
    if (tot[i] < chil) {
      while (1) {
        tot[i] += bus[i].t;
        if (tot[i] >= chil) break;
      }
    }
  }
  int min = 0x3f3f3f3f;
  int num;
  for (int i = 1; i <= n; i++) {
    if (tot[i] - chil < min) {
      min = tot[i] - chil;
      num = i;
    }
  }
  cout << num;
}
