#include <bits/stdc++.h>
using namespace std;
struct bs {
  int x, y;
} S[100005];
int main() {
  int n, t;
  while (cin >> n >> t) {
    for (int i = 0; i < n; i++) {
      cin >> S[i].x >> S[i].y;
    }
    int flag = 0;
    int min = 1000050;
    int position = 0;
    while (1) {
      for (int i = 0; i < n; i++) {
        if (S[i].x == t) {
          flag = 1;
          cout << (i + 1) << endl;
          break;
        }
      }
      if (flag == 1) {
        break;
      }
      for (int i = 0; i < n; i++) {
        while (1) {
          if (S[i].x < t) {
            S[i].x = S[i].x + S[i].y;
          } else {
            break;
          }
        }
      }
      for (int i = 0; i < n; i++) {
        if (S[i].x - t < min) {
          min = S[i].x - t;
          position = i + 1;
        }
      }
      if (min != 1000050) {
        cout << position << endl;
        break;
      }
    }
  }
}
