#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 100;
const int magic = sqrt(maxn) + 1;
int n, m, a[maxn];
int dp[maxn], last[maxn];
int fto[maxn];
void build(int block) {
  int c_l = (block * magic), c_r = c_l + magic - 1;
  if (c_r >= n) c_r = n - 1;
  for (int i = (c_r); i >= (c_l); i--) {
    if (i + a[i] > c_r)
      dp[i] = 1, last[i] = i;
    else
      dp[i] = dp[i + a[i]] + 1, last[i] = last[i + a[i]];
  }
}
void upd(int pos, int val) {
  a[pos] = val;
  build(fto[pos]);
}
pair<int, int> get(int pos) {
  int ans = 0, res = 0;
  while (pos < n) {
    ans += dp[pos];
    pos = last[pos];
    res = pos;
    pos = pos + a[pos];
  }
  return make_pair(res + 1, ans);
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = (0); i <= (n - 1); i++) scanf("%d", a + i), fto[i] = i / magic;
  for (int i = (fto[n - 1]); i >= (0); i--) build(i);
  int type, pos, val;
  for (int i = (1); i <= (m); i++) {
    scanf("%d%d", &type, &pos);
    if (type == 0) {
      scanf("%d", &val);
      upd(pos - 1, val);
    } else {
      pair<int, int> ans = get(pos - 1);
      printf("%d %d\n", ans.first, ans.second);
    }
  }
  return 0;
}
