#include <bits/stdc++.h>
using namespace std;
const int mxn = 1e5 + 5;
const int blk = 320;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  for (auto &x : a) cin >> x;
  vector<int> nxt(n), cnt(n), lst(n);
  auto upd = [&](int b) -> void {
    int s = blk * b;
    int e = min(n - 1, s + blk - 1);
    for (int i = e; i >= s; i--) {
      int nt = i + a[i];
      if (nt >= n) {
        cnt[i] = 1;
        nxt[i] = n;
        lst[i] = i;
      } else if (nt <= e) {
        cnt[i] = cnt[nt] + 1;
        nxt[i] = nxt[nt];
        lst[i] = lst[nt];
      } else {
        cnt[i] = 1;
        nxt[i] = nt;
        lst[i] = i;
      }
    }
  };
  auto query = [&](int pos) -> pair<int, int> {
    int cur = pos;
    int last = lst[pos];
    int res = cnt[cur];
    cur = nxt[cur];
    while (cur != n) {
      res += cnt[cur];
      last = lst[cur];
      cur = nxt[cur];
    }
    return {last + 1, res};
  };
  int total = n / blk + bool(n % blk > 0);
  for (int i = 0; i < total; i++) {
    upd(i);
  }
  while (m--) {
    int t;
    cin >> t;
    if (t) {
      int x;
      cin >> x;
      x--;
      pair<int, int> ans = query(x);
      cout << ans.first << " " << ans.second << "\n";
    } else {
      int x, y;
      cin >> x >> y;
      x--;
      int pos = x / blk;
      a[x] = y;
      upd(pos);
    }
  }
  return 0;
}
