#include <bits/stdc++.h>
using namespace std;
const long long N = 1e4 + 0.000001;
int main() {
  cout.tie(NULL);
  cin.tie(NULL);
  ios_base::sync_with_stdio(0);
  long long n, t;
  cin >> n >> t;
  deque<pair<long long, long long> > v;
  for (long long i = 0; i < n; i++) {
    long long s, d;
    cin >> s >> d;
    if (s == t)
      return cout << i + 1, 0;
    else if (s > t)
      v.push_back({s, i + 1});
    else {
      while (s < t) s += d;
      v.push_back({s, i + 1});
    }
  }
  sort(v.begin(), v.end());
  cout << v[0].second;
}
