#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 55;
int rt;
int block[N];
int point[N];
pair<int, pair<int, int> > a[N];
int b[N];
int n, m;
void build() {
  block[0] = 1;
  for (int i = 1, j = 0; i < n; i++, j++) {
    block[i] = block[i - 1];
    if (j > rt) {
      j = 0;
      block[i]++;
    }
    point[block[i]] = i;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (b[i] + i >= n)
      a[i] = {n, {1, i}};
    else if (block[b[i] + i] > block[i])
      a[i] = {b[i] + i, {1, i}};
    else
      a[i] = {a[b[i] + i].first,
              {a[b[i] + i].second.first + 1, a[b[i] + i].second.second}};
  }
}
void query(int x) {
  int counter = 0;
  int lst = -1;
  while (x != n) {
    counter += a[x].second.first;
    lst = a[x].second.second;
    x = a[x].first;
  }
  printf("%d %d\n", lst + 1, counter);
}
void update(int x, int d) {
  b[x] = d;
  for (int i = point[block[x]]; block[i] == block[x] && i >= 0; i--) {
    if (b[i] + i >= n)
      a[i] = {n, {1, i}};
    else if (block[b[i] + i] > block[i])
      a[i] = {b[i] + i, {1, i}};
    else
      a[i] = {a[b[i] + i].first,
              {a[b[i] + i].second.first + 1, a[b[i] + i].second.second}};
  }
}
int main() {
  scanf("%d %d", &n, &m);
  rt = sqrt(n);
  for (int i = 0; i < n; i++) scanf("%d", b + i);
  build();
  int t, x, d;
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &t, &x);
    x--;
    if (t == 1)
      query(x);
    else {
      scanf("%d", &d);
      update(x, d);
    }
  }
  return 0;
}
