#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5, Magic = 666;
int n, m;
int L[N], R[N], s[N], num;
pair<int, int> a[N];
void gao(int id) {
  for (int i = R[id]; i >= L[id]; i--) {
    int newpos = i + s[i];
    if (newpos > R[id]) {
      a[i] = {-1, 1};
    } else {
      if (a[newpos].first == -1)
        a[i] = {newpos, 1};
      else
        a[i] = {a[newpos].first, a[newpos].second + 1};
    }
  }
}
void init() {
  num = (n + Magic - 1) / Magic;
  for (int i = 1; i <= n; i += Magic) {
    L[i / Magic] = i;
    R[i / Magic] = min(i + Magic - 1, n);
  }
  for (int i = 0; i < num; i++) gao(i);
}
void calc(int pos) {
  int ids = 0, sum = 0;
  for (; pos <= n;) {
    if (a[pos].first != -1) {
      int x = a[pos].first;
      ids = pos;
      sum += a[pos].second;
      pos = x;
    }
    ids = pos;
    pos = pos + s[pos];
    sum++;
  }
  cout << ids << ' ' << sum << '\n';
}
void solve() {
  int op, x, y;
  while (m--) {
    cin >> op >> x;
    if (op == 0) {
      cin >> y;
      s[x] = y;
      gao(x / Magic);
    } else {
      calc(x);
    }
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= (n); i++) cin >> s[i];
  init();
  solve();
  return 0;
}
