#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  int k = (int)sqrt(n);
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  vector<int> next(n), cnt(n);
  int x;
  for (int i = n - 1; i >= 0; --i) {
    x = a[i] + i;
    if (x >= n) {
      cnt[i] = 1;
      next[i] = n;
    } else if (i / k != x / k) {
      cnt[i] = 1;
      next[i] = x;
    } else {
      cnt[i] = cnt[x] + 1;
      next[i] = next[x];
    }
  }
  int type, w, p, last = 0;
  for (int i = 0; i < m; ++i) {
    cin >> type >> w;
    --w;
    if (type) {
      int res = 0;
      while (next[w] != n) {
        res += cnt[w];
        w = next[w];
      }
      res += cnt[w];
      while (w != n) {
        last = w;
        w = min(n, w + a[w]);
      }
      cout << last + 1 << ' ' << res << '\n';
    } else {
      cin >> p;
      a[w] = p;
      for (int i = w, end = w / k * k; i >= end; --i) {
        x = a[i] + i;
        if (x >= n) {
          cnt[i] = 1;
          next[i] = n;
        } else if (i / k != x / k) {
          cnt[i] = 1;
          next[i] = x;
        } else {
          cnt[i] = cnt[x] + 1;
          next[i] = next[x];
        }
      }
    }
  }
  return 0;
}
