#include <bits/stdc++.h>
using namespace std;
int n, m, q, x, y, z, s, w, t, d, k, ans, f[100100], a[100100], b[100100],
    c[100100];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> q;
  s = ceil(sqrt(n));
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i] += i;
    f[i] = a[i];
  }
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] < min(n, (i / s + 1) * s)) {
      f[i] = f[a[i]];
      c[i] = c[a[i]];
      b[i] = b[a[i]] + 1;
    } else {
      f[i] = a[i];
      c[i] = i;
      b[i] = 1;
    }
  }
  for (int j = 0; j < q; j++) {
    cin >> x;
    if (x == 0) {
      cin >> x >> y;
      x--;
      a[x] = y + x;
      f[x] = y + x;
      w = min(n, (x / s + 1) * s);
      for (int i = x; i >= (x / s) * s; i--) {
        if (a[i] < w) {
          f[i] = f[a[i]];
          c[i] = c[a[i]];
          b[i] = b[a[i]] + 1;
        } else {
          f[i] = a[i];
          c[i] = i;
          b[i] = 1;
        }
      }
    } else {
      cin >> x;
      x--;
      y = 0;
      while (f[x] < n) {
        y += b[x];
        x = f[x];
      }
      y += b[x];
      cout << c[x] + 1 << ' ' << y << endl;
    }
  }
  return 0;
}
