#include <bits/stdc++.h>
int min(int a, int b) {
  if (a <= b) {
    return a;
  } else {
    return b;
  }
}
int main() {
  int j, k, i, n, a[100005], b[100005], c[100005], q, y;
  scanf("%d %d", &n, &q);
  y = sqrt(n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  k = 0;
  for (i = y; i <= n; i += y) {
    b[i] = 1;
    c[i] = (i + a[i] > n) ? -1 : i + a[i];
  }
  for (i = y; i <= n; i += y, k++) {
    for (j = i - 1; j >= k * (i - (k * y)) + 1; j--) {
      if (a[j] >= (i - j + 1)) {
        b[j] = 1;
        c[j] = (j + a[j] > n) ? -1 : j + a[j];
      } else {
        b[j] = 1 + b[j + a[j]];
        c[j] = c[j + a[j]];
      }
    }
  }
  b[n] = 1;
  c[n] = -1;
  if (i - y < n) {
    for (j = n - 1; j > i - y; j--) {
      b[j] = (a[j] >= (min(((((j - 1) / y) + 1) * y), n) - j + 1))
                 ? 1
                 : 1 + b[j + a[j]];
      if (j + a[j] > n) {
        c[j] = -1;
      } else {
        if (a[j] >= (min(((((j - 1) / y) + 1) * y), n) - j + 1)) {
          c[j] = j + a[j];
        } else {
          c[j] = c[j + a[j]];
        }
      }
    }
  }
  int x, m1, m2, a1 = 0, a2 = 0;
  for (i = 1; i <= q; i++) {
    scanf("%d", &x);
    if (x == 1) {
      a1 = 0;
      scanf("%d", &m1);
      j = m1;
      if (c[j] == -1 && b[j] == 1) {
        a1 = b[j];
        a2 = j;
      } else if (c[j] == -1 && b[j] != 1) {
        a1 = b[j];
        while (b[j] != 1) {
          a2 = j + a[j];
          j = a2;
        }
      } else {
        while (c[j] != -1) {
          a1 += b[j];
          a2 = c[j];
          j = c[j];
        }
        a1 += b[j];
        if (b[j] != 1) {
          while (b[j] != 1) {
            a2 = j + a[j];
            j = a2;
          }
        }
      }
      printf("%d %d\n", a2, a1);
    } else {
      scanf("%d %d", &m1, &m2);
      a[m1] = m2;
      b[m1] = (a[m1] >= (min(((((m1 - 1) / y) + 1) * y), n) - m1 + 1))
                  ? 1
                  : 1 + b[m1 + a[m1]];
      if (m1 + a[m1] > n) {
        c[m1] = -1;
      } else {
        if (a[m1] >= (min(((((m1 - 1) / y) + 1) * y), n) - m1 + 1)) {
          c[m1] = m1 + a[m1];
        } else {
          c[m1] = c[m1 + a[m1]];
        }
      }
      for (j = m1 - 1; j > (((m1 - 1) / y) * y); j--) {
        b[j] = (a[j] >= (min(((((j - 1) / y) + 1) * y), n) - j + 1))
                   ? 1
                   : 1 + b[j + a[j]];
        if (j + a[j] > n) {
          c[j] = -1;
        } else {
          if (a[j] >= (min(((((j - 1) / y) + 1) * y), n) - j + 1)) {
            c[j] = j + a[j];
          } else {
            c[j] = c[j + a[j]];
          }
        }
      }
    }
  }
  return 0;
}
