#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 10;
void solve() {
  int n, t;
  cin >> n >> t;
  int best_route = -1;
  int best_time = 987654321;
  for (int i = 0; i < n; ++i) {
    int s, d;
    cin >> s >> d;
    int cur_time = -1;
    for (int cur = s;; cur += d) {
      if (cur >= t) {
        cur_time = cur;
        break;
      }
    }
    if (best_time > cur_time) {
      best_time = cur_time;
      best_route = i + 1;
    }
  }
  cout << best_route << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(20);
  cout << fixed;
  solve();
  return 0;
}
