#include <bits/stdc++.h>
using namespace std;
int n, m, SQRT = 350;
int a[100000];
int h[100000];
int last[100000];
inline void get(int i) {
  int t = i + a[i];
  int block = i / SQRT;
  int tt = (block + 1) * SQRT;
  if (n < tt) tt = n;
  if (t >= tt) {
    last[i] = i;
    h[i] = 1;
  } else {
    last[i] = last[t];
    h[i] = 1 + h[t];
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = n - 1; i >= 0; i--) get(i);
  while (m--) {
    int tp, idx, value;
    cin >> tp;
    if (tp == 0) {
      cin >> idx >> value;
      idx--;
      a[idx] = value;
      int down = (idx / SQRT) * SQRT;
      for (int i = idx; i >= down; i--) get(i);
    } else {
      cin >> idx;
      idx--;
      int res = 0, pre = idx;
      while (idx < n) {
        res += h[idx];
        pre = last[idx];
        idx = pre + a[pre];
      }
      cout << pre + 1 << ' ' << res << '\n';
    }
  }
  return 0;
}
