#include <bits/stdc++.h>
using namespace std;
const int N = 1e5, K = 1024;
int g[N];
pair<int, int> ans[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, t, v, u;
  cin >> n >> m;
  for (int i = 0, x; i < n; i++) {
    cin >> x;
    g[i] = -1;
    if (i + x < n) {
      g[i] = i + x;
    }
  }
  for (int i = n / K; i >= 0; --i) {
    for (int j = (i + 1) * K - 1; j >= i * K; j--) {
      if (j >= n) {
        continue;
      }
      if (g[j] == -1) {
        ans[j] = {j, 1};
      } else if (j / K != g[j] / K) {
        ans[j] = {g[j], 1};
      } else {
        if (g[g[j]] == -1 && ans[g[j]].first == g[j]) {
          ans[j] = {ans[g[j]].first, ans[g[j]].second};
        } else {
          ans[j] = {ans[g[j]].first, ans[g[j]].second + 1};
        }
      }
    }
  }
  while (cin >> t) {
    cin >> v;
    --v;
    if (t == 0) {
      cin >> u;
      if ((v + u) < n) {
        g[v] = v + u;
      } else {
        g[v] = -1;
      }
      int to = v / K * K;
      for (int j = v; j >= to; j--) {
        if (j >= n) {
          continue;
        }
        int gj = g[j];
        if (gj == -1) {
          ans[j] = {j, 1};
        } else if (j / K != gj / K) {
          ans[j] = {gj, 1};
        } else {
          auto ansgj = ans[gj];
          if (g[gj] == -1 && ansgj.first == gj) {
            ans[j] = {ansgj.first, ansgj.second};
          } else {
            ans[j] = {ansgj.first, ansgj.second + 1};
          }
        }
      }
    } else {
      int res = 0;
      while (g[v] != -1) {
        res += ans[v].second;
        v = ans[v].first;
      }
      cout << v + 1 << " " << res + 1 << '\n';
    }
  }
  return 0;
}
