#include <bits/stdc++.h>
using ll = long long;
const int MAXN = 105;
int n, t;
struct P {
  int s, d;
  int id;
} fuck[MAXN];
inline bool comp(const P &a, const P &b) { return a.s < b.s; }
int main() {
  scanf("%d %d", &n, &t);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &fuck[i].s, &fuck[i].d);
    fuck[i].id = i;
    if (fuck[i].s == t) {
      printf("%d\n", i);
      return 0;
    }
  }
  std::sort(fuck + 1, fuck + 1 + n, comp);
  int ans = 0, dis = 0x7f7f7f7f, com = 0x7f7f7f7f;
  for (int i = 1; i <= n; i++) {
    if (fuck[i].s < t) {
      for (int k = 1;; k++) {
        if (fuck[i].s + fuck[i].d * k >= t) {
          dis = fuck[i].s + k * fuck[i].d;
          break;
        }
      }
      if (dis < com) {
        com = dis;
        ans = fuck[i].id;
      }
    }
    if (fuck[i].s > t) {
      if (fuck[i].s < com) {
        ans = fuck[i].id;
        break;
      }
      if (com == 0x7f7f7f7f) {
        ans = fuck[i].id;
        break;
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
