#include <bits/stdc++.h>
using namespace std;
namespace yspm {
inline long long read() {
  long long res = 0, f = 1;
  char k;
  while (!isdigit(k = getchar()))
    if (k == '-') f = -1;
  while (isdigit(k)) res = res * 10 + k - '0', k = getchar();
  return res * f;
}
const long long N = 5e5 + 10;
long long f[N], c[N][2], v[N], s[N], st[N], m, n, las[N], mx[N];
bool r[N];
inline bool nroot(long long x) { return c[f[x]][0] == x || c[f[x]][1] == x; }
inline void push_up(long long x) {
  s[x] = s[c[x][0]] + s[c[x][1]] + 1;
  if (x != n + 1)
    mx[x] = max(max(mx[c[x][0]], mx[c[x][1]]), x);
  else
    mx[x] = max(mx[c[x][0]], mx[c[x][1]]);
  return;
}
inline void pushr(long long x) {
  swap(c[x][0], c[x][1]);
  r[x] ^= 1;
  return;
}
inline void push_down(long long x) {
  if (r[x]) {
    if (c[x][0]) pushr(c[x][0]);
    if (c[x][1]) pushr(c[x][1]);
    r[x] = 0;
  }
  return;
}
inline void rotate(long long x) {
  long long y = f[x], z = f[y], k = (c[y][1] == x), w = c[x][!k];
  if (nroot(y)) c[z][c[z][1] == y] = x;
  c[x][!k] = y;
  c[y][k] = w;
  if (w) f[w] = y;
  f[y] = x;
  f[x] = z;
  push_up(y);
  return;
}
inline void splay(long long x) {
  long long y = x, z = 0;
  st[++z] = y;
  while (nroot(y)) st[++z] = y = f[y];
  while (z) push_down(st[z--]);
  while (nroot(x)) {
    y = f[x], z = f[y];
    if (nroot(y)) rotate((c[y][0] == x) ^ (c[z][0] == y) ? x : y);
    rotate(x);
  }
  return push_up(x), void();
}
inline void access(long long x) {
  for (long long y = 0; x; x = f[y = x]) splay(x), c[x][1] = y, push_up(x);
  return;
}
inline void makeroot(long long x) {
  access(x);
  splay(x);
  pushr(x);
  return;
}
inline long long findroot(long long x) {
  access(x);
  splay(x);
  while (c[x][0]) push_down(x), x = c[x][0];
  splay(x);
  return x;
}
inline void split(long long x, long long y) {
  makeroot(x);
  access(y);
  splay(y);
  return;
}
inline void link(long long x, long long y) {
  makeroot(x);
  if (findroot(y) != x) f[x] = y;
  return;
}
inline void cut(long long x, long long y) {
  makeroot(x);
  if (findroot(y) == x && f[y] == x && !c[y][0]) f[y] = c[x][1] = 0;
  push_up(x);
  return;
}
signed main() {
  n = read();
  m = read();
  for (long long i = 1; i <= n; ++i)
    las[i] = read(), link(i, min(i + las[i], n + 1)), v[i] = 1;
  while (m--) {
    long long opt = read();
    if (opt == 1) {
      long long x = read();
      split(x, n + 1);
      printf("%lld %lld\n", mx[n + 1], s[n + 1] - 1);
    } else {
      long long x = read(), p = read();
      cut(x, min(n + 1, x + las[x]));
      las[x] = p;
      link(x, min(x + las[x], n + 1));
    }
  }
  return 0;
}
}  // namespace yspm
signed main() { return yspm::main(); }
