#include <bits/stdc++.h>
const long long INFl = 1e18;
const int INF = 1e9 + 337;
using namespace std;
int n, m;
int bsize = 500;
vector<int> a;
vector<pair<int, int>> d;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  cin >> n >> m;
  a.resize(n);
  for (auto& x : a) cin >> x;
  d.resize(n);
  for (int i = n - 1; i >= 0; i--) {
    int l = i / bsize * bsize;
    int r = min(l + bsize, n);
    if (i + a[i] >= r) {
      if (i + a[i] >= n)
        d[i] = make_pair(n, 1);
      else
        d[i] = make_pair(i + a[i], 1);
    } else {
      d[i] = d[i + a[i]];
      d[i].second++;
    }
  }
  for (int i = 0; i < m; i++) {
    int type;
    cin >> type;
    if (type == 0) {
      int x, y;
      cin >> x >> y;
      x--;
      int l = x / bsize * bsize;
      int r = min(n, l + bsize);
      a[x] = y;
      if (x + a[x] >= r) {
        if (x + a[x] >= n)
          d[x] = make_pair(n, 1);
        else
          d[x] = make_pair(x + a[x], 1);
      } else {
        d[x] = d[x + a[x]];
        d[x].second++;
      }
      for (int j = x - 1; j >= l; j--) {
        if (j + a[j] <= x) {
          d[j] = d[j + a[j]];
          d[j].second++;
        }
      }
    } else {
      int x;
      cin >> x;
      x--;
      int ans = 0;
      while (d[x].first != n) {
        ans += d[x].second;
        x = d[x].first;
      }
      while (x + a[x] < n) {
        x += a[x];
        ans++;
      }
      cout << x + 1 << ' ' << ans + 1 << '\n';
    }
  }
}
