#include <bits/stdc++.h>
using namespace std;
string s[105];
vector<long long> v;
int main() {
  long long n, i, t, mn, y, z, x, num, ans;
  cin >> n >> t;
  mn = 10000000;
  for (i = 1; i <= n; i++) {
    cin >> x >> y;
    num = t;
    if (x <= num) {
      num = num - x;
    } else {
      num = 0;
    }
    z = ceil(1.0 * num / y);
    num = z * y + x;
    if (mn >= abs(num - t)) {
      mn = abs(num - t);
      ans = i;
    }
  }
  cout << ans << endl;
  return 0;
}
