#include <bits/stdc++.h>
using namespace std;
const long long N = 501;
const long long INF = 1e8;
const long long mod = 1e9 + 7;
int n;
int m;
int x;
int y;
int cnt;
vector<pair<pair<int, int>, int> > v;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> x >> y;
    cnt = 0;
    while (x < m) {
      x += y;
      cnt++;
    }
    v.push_back({{x, cnt}, i});
  }
  sort(v.begin(), v.end());
  auto it = *v.begin();
  cout << it.second;
}
