#include <bits/stdc++.h>
using namespace std;
const int N = 2e5;
int n, m, par[N], a[N];
pair<int, int> p[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  {
    int sq = sqrt(n);
    for (int i = 0; i < n; i += sq)
      for (int j = 0; j < sq; j++) par[i + j] = i + sq;
  }
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = n - 1; i >= 0; i--)
    if (i + a[i] >= n || par[i + a[i]] != par[i])
      p[i] = pair<int, int>(i, 1);
    else
      p[i] = p[i + a[i]], p[i].second++;
  while (m--) {
    int t, x, y;
    cin >> t >> x;
    x--;
    if (!t) {
      cin >> y;
      a[x] = y;
      for (int i = x; i >= 0 && par[i] == par[x]; i--)
        if (i + a[i] >= n || par[i + a[i]] != par[i])
          p[i] = pair<int, int>(i, 1);
        else
          p[i] = p[i + a[i]], p[i].second++;
    } else {
      int ls = p[x].first, ans = p[x].second;
      while (ls + a[ls] < n) {
        ls += a[ls];
        ans += p[ls].second, ls = p[ls].first;
      }
      cout << ls + 1 << ' ' << ans << '\n';
    }
  }
  return 0;
}
