#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)1e+9 + 7ll;
const long long linf = (long long)1e+18 + 7ll;
const long double eps = (long double)1e-9;
const long double pi = acosl((long double)-1.0);
const int alph = 26;
static char buff[(int)2e6 + 17];
const int maxn = (int)3e5 + 17;
int n, q, SQRT;
int a[maxn], nx[maxn], t[maxn];
bool read() {
  if (scanf("%d %d", &n, &q) != 2) return false;
  for (long long i = 0ll; i < (long long)n; ++i) {
    scanf("%d", a + i);
    a[i] = min(n, (int)i + a[i]);
  }
  return true;
}
void upd(int l, int r) {
  a[l] = r;
  if (r == n || l / SQRT != r / SQRT)
    t[l] = 1, nx[l] = r;
  else {
    t[l] = 1 + t[r];
    nx[l] = nx[r];
  }
  for (int i = l - 1; i >= 0 && i / SQRT == l / SQRT; --i)
    if (a[i] != n && i / SQRT == a[i] / SQRT) {
      t[i] = 1 + t[a[i]];
      nx[i] = nx[a[i]];
    }
}
void calc(int i) {
  int res = 0, pr = -1;
  for (; nx[i] != n; i = nx[i]) res += t[i];
  for (; i != n; i = a[i]) ++res, pr = i;
  printf("%d %d\n", pr + 1, res);
}
void solve() {
  SQRT = ceil(sqrt(double(n)));
  for (int i = n - 1; i >= 0; --i) {
    int j = a[i];
    t[i] = 1;
    for (; j != n && i / SQRT == j / SQRT; j = a[j], ++t[i])
      ;
    nx[i] = j;
  }
  for (int j = 0; j < q; ++j) {
    int tp;
    scanf("%d", &tp);
    if (tp == 0) {
      int l, r;
      scanf("%d %d", &l, &r);
      upd(l - 1, min(n, l + r - 1));
    } else {
      int i;
      scanf("%d", &i);
      calc(i - 1);
    }
  }
}
int main() {
  while (read()) solve();
  return 0;
}
