#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const long long ooo = 9223372036854775807ll;
const int _cnt = 1000 * 1000 + 7;
const int _p = 1000 * 1000 * 1000 + 7;
const int N = 100005;
const double PI = acos(-1.0);
const double eps = 1e-9;
int o(int x) { return x % _p; }
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
void file_put() {
  string s = "/home/jslijin/jslijin/code/";
  freopen((s + "code.in").c_str(), "r", stdin);
  freopen((s + "code.out").c_str(), "w", stdout);
}
int n, q, last[N], a[N], cnt[N], ans = 0, op, x, y, B;
struct LCT {
  int f[N], c[2][N], rev[N], s[N], n, cnt_B;
  int v[N];
  void init(int _n) {
    memset(f, 0, sizeof(f));
    memset(c, 0, sizeof(c));
    memset(rev, 0, sizeof(rev));
    cnt_B = n = _n;
    for (int i = (1); i <= (n); ++i) s[i] = 1;
  }
  void push_up(int x) { s[x] = s[c[0][x]] + s[c[1][x]] + 1; }
  void U(int x, int r) {
    if (!x) return;
    if (r) swap(c[0][x], c[1][x]), rev[x] ^= 1;
  }
  void push_down(int x) {
    U(c[0][x], rev[x]);
    U(c[1][x], rev[x]);
    rev[x] = 0;
  }
  bool is_r(int x) { return c[0][f[x]] != x && c[1][f[x]] != x; }
  void U_P(int x) {
    if (!is_r(x)) U_P(f[x]);
    push_down(x);
  }
  void rot(int x) {
    int y = f[x], z = f[y], l = (c[1][y] == x), r = l ^ 1;
    if (!is_r(y)) c[c[1][z] == y][z] = x;
    f[x] = z, f[y] = x, f[c[r][x]] = y, c[l][y] = c[r][x], c[r][x] = y;
    push_up(y), push_up(x);
  }
  void SP(int x) {
    U_P(x);
    for (; !is_r(x); rot(x)) {
      int y = f[x], z = f[y];
      if (!is_r(y))
        if ((c[0][y] == x) ^ (c[0][z] == y))
          rot(x);
        else
          rot(y);
    }
  }
  void AC(int x) {
    for (int t = 0; x; x = f[x]) SP(x), c[1][x] = t, push_up(x), t = x;
  }
  void make_R(int x) { AC(x), SP(x), swap(c[0][x], c[1][x]), rev[x] ^= 1; }
  void get_P(int x, int y) {
    make_R(x);
    AC(y);
    SP(y);
  }
  void link(int x, int y) {
    make_R(x), f[x] = y;
    --cnt_B;
  }
  void cut(int x, int y) {
    get_P(x, y), c[0][y] = f[c[0][y]] = 0, push_up(y);
    ++cnt_B;
  }
  int get_dep(int x) {
    AC(x);
    SP(x);
    return s[x];
  }
  int get_R(int x) {
    AC(x), SP(x);
    for (; c[0][x]; x = c[0][x]) push_down(x);
    return x;
  }
  int get_r(int x) {
    while (!is_r(x)) x = f[x];
    return x;
  }
  int get_F(int x) {
    AC(x);
    SP(x);
    for (x = c[0][x]; c[1][x]; x = c[1][x])
      ;
    return x;
  }
  bool is_Home(int x, int y) { return get_R(x) == get_R(y); }
  bool is_home(int x, int y) { return get_r(x) == get_r(y); }
  bool LC(int op, int x, int y) {
    if (is_Home(x, y) == op) return false;
    if (op == 1)
      link(x, y);
    else
      cut(x, y);
    return true;
  }
} T;
int main() {
  scanf("%d%d", &n, &q), B = sqrt(n) + 0.5;
  T.init(n);
  for (int i = (1); i <= (n); ++i) {
    scanf("%d", &a[i]);
    if (i + a[i] <= n)
      T.LC(1, i, i + a[i]);
    else
      T.make_R(i);
  }
  while (q--) {
    scanf("%d%d", &op, &x);
    if (op) {
      printf("%d %d\n", T.get_R(x), T.get_dep(x));
    } else {
      int p1 = T.get_R(x);
      scanf("%d", &y);
      int p2 = x + y <= n ? T.get_R(x + y) : -1;
      if (x + a[x] <= n) T.LC(0, x, x + a[x]);
      a[x] = y;
      if (x + a[x] <= n) T.LC(1, x, x + a[x]);
      T.make_R(p1);
      if (p2 != -1) T.make_R(p2);
    }
  }
  return 0;
}
