func_code_string: #include <bits/stdc++.h>   using namespace std;   void solve() {     int n, t;     while (cin >> n >> t) {       int x, y;       vector<pair<int, int> > a;       vector<pair<int, int> > v;       for (int i = 0; i < n; i++) {         cin >> x >> y;         a.push_back(make_pair(x, y));       }       for (int i = 0; i < n; i++) {         while (a[i].first < t) a[i].first += a[i].second;         v.push_back(make_pair(a[i].first, i));       }       sort(v.begin(), v.end());       cout << (v[0].second) + 1 << endl;     }   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     solve();   }   