#include <bits/stdc++.h>
const int mod = 988244353;
using namespace std;
inline int read() {
  int f = 1, x = 0;
  char s = getchar();
  while (!isdigit(s)) {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (isdigit(s)) {
    x = (x << 1) + (x << 3) + (s ^ 48), s = getchar();
  }
  return x * f;
}
int n, m, belong[402000], l[402000], r[402000], to[402000], tim[402000],
    b[402000];
inline void build() {
  int cnt = sqrt(n);
  int len = n / cnt;
  if (n % cnt) cnt++;
  for (int i = 1; i <= n; i++) belong[i] = (i - 1) / len + 1;
  for (int i = 1; i <= cnt; i++) l[i] = r[i - 1] + 1, r[i] = l[i] + len - 1;
  r[cnt] = n;
}
inline void init(int x) {
  if (to[x]) return;
  if (r[belong[x]] < x + b[x]) {
    to[x] = x + b[x], tim[x] = 1;
    return;
  }
  init(x + b[x]);
  to[x] = to[x + b[x]], tim[x] = tim[x + b[x]] + 1;
}
int last = 0;
inline int ask(int x) {
  int ans = 0;
  last = x;
  while (x <= n) ans += tim[x], last = x, x = to[x];
  return ans;
}
inline void modify(int x, int k) {
  b[x] = k;
  for (int i = l[belong[x]]; i <= r[belong[x]]; i++) to[i] = 0, tim[i] = 0;
  for (int i = l[belong[x]]; i <= r[belong[x]]; i++)
    if (!to[i]) init(i);
}
signed main(void) {
  n = read(), m = read();
  build();
  for (int i = 1; i <= n; i++) b[i] = read();
  for (int i = 1; i <= n; i++)
    if (!to[i]) init(i);
  for (int i = 1; i <= m; i++) {
    int c = read(), h = read();
    if (c) {
      int t = ask(h), pre = 0;
      while (last <= n) pre = b[last], last += b[last];
      printf("%d %d\n", last - pre, t);
    } else {
      int k = read();
      modify(h, k);
    }
  }
  return 0;
}
