#include <bits/stdc++.h>
using namespace std;
namespace IO {
char buf[1 << 15], *S, *T;
inline char gc() {
  if (S == T) {
    T = (S = buf) + fread(buf, 1, 1 << 15, stdin);
    if (S == T) return EOF;
  }
  return *S++;
}
inline int read() {
  register int x;
  register bool f;
  register char c;
  for (f = 0; (c = gc()) < '0' || c > '9'; f = c == '-')
    ;
  for (x = c ^ '0'; (c = gc()) >= '0' && c <= '9';
       x = (x << 3) + (x << 1) + (c ^ '0'))
    ;
  return f ? -x : x;
}
inline long long readll() {
  register long long x;
  register bool f;
  register char c;
  for (f = 0; (c = gc()) < '0' || c > '9'; f = c == '-')
    ;
  for (x = c ^ '0'; (c = gc()) >= '0' && c <= '9';
       x = (x << 3) + (x << 1) + (c ^ '0'))
    ;
  return f ? -x : x;
}
}  // namespace IO
using namespace IO;
int n, t, d[110], s[110], ans, anst;
int main() {
  anst = 1000000;
  n = read(), t = read();
  for (int i = 1; i <= n; i++) {
    s[i] = read(), d[i] = read();
    if (t <= s[i]) {
      if (s[i] <= anst) {
        ans = i, anst = s[i];
      }
      cerr << i << " " << s[i] << endl;
    } else {
      int x = ceil(1.0 * (t - s[i]) / d[i]);
      cerr << i << ": " << x * d[i] + s[i] << endl;
      if (anst > x * d[i] + s[i]) ans = i, anst = x * d[i] + s[i];
    }
  }
  cout << ans << endl;
  return 0;
}
