#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); };
int main() {
  std::ios::sync_with_stdio(false);
  int n, t;
  scanf("%d %d", &n, &t);
  vector<pair<int, int> > buses;
  for (int i = 0; i < n; i++) {
    int s, d;
    scanf("%d %d", &s, &d);
    while (s < t) {
      s += d;
    }
    buses.emplace_back(s, i + 1);
  }
  sort(buses.begin(), buses.end());
  printf("%d\n", buses[0].second);
};
