#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using G = vector<vector<int>>;
int di[] = {0, -1, 0, 1};
int dj[] = {1, 0, -1, 0};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, t;
  cin >> n >> t;
  vector<pair<int, int>> v;
  for (int i = (0); i < (n); i++) {
    int s, d;
    cin >> s >> d;
    int tt = s;
    while (tt < t) {
      tt += d;
    }
    v.push_back({tt, i + 1});
  }
  sort(v.begin(), v.end());
  cout << v[0].second << endl;
  return 0;
}
