#include <bits/stdc++.h>
using namespace std;
const long long maxn = 100005, mod = 1000000007, inf = 1000000000;
long long n, ans, k, m, t;
long long a[maxn], b[maxn], s[maxn];
vector<long long> v[maxn];
bool mark[maxn];
void dfs(long long x) {
  mark[x] = 1;
  for (long long i = 0; i < v[x].size(); i++) {
    if (!mark[v[x][i]]) dfs(v[x][i]);
  }
}
int f(int x) {
  if (t <= a[x]) return a[x];
  return ((t - a[x] + b[x] - 1) / b[x]) * b[x] + a[x];
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> t;
  k = inf;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    s[i] = f(i);
    if (s[i] < k) {
      ans = i;
      k = s[i];
    }
  }
  cout << ans + 1;
  return 0;
}
