#include <bits/stdc++.h>
using namespace std;
int n, a[100001], m, t, p, l, r, u, v, ans;
int f[100001], g[100001];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> m;
  p = sqrt(n);
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 0; i <= n / p; i++) {
    l = max(1, i * p), r = min(n, (i + 1) * p - 1);
    for (int j = r; j >= l; j--) {
      if (j + a[j] > r) {
        f[j] = j + a[j];
        g[j] = 1;
      } else {
        f[j] = f[j + a[j]];
        g[j] = g[a[j] + j] + 1;
      }
    }
  }
  while (m--) {
    cin >> t;
    if (t == 0) {
      cin >> u >> v;
      a[u] = v;
      int sokhoi = u / p;
      l = max(sokhoi * p, 1), r = min(n, (sokhoi + 1) * p - 1);
      for (int j = r; j >= l; j--) {
        if (j + a[j] > r) {
          f[j] = j + a[j];
          g[j] = 1;
        } else {
          f[j] = f[j + a[j]];
          g[j] = g[a[j] + j] + 1;
        }
      }
    } else {
      ans = 0;
      cin >> u;
      while (u <= n) {
        ans += g[u];
        if (f[u] > n) break;
        u = f[u];
      }
      while (u + a[u] <= n) u += a[u];
      cout << u << " " << ans << '\n';
    }
  }
}
