#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  int len = ceil(sqrt(n));
  vector<int> a(n);
  vector<int> isterm(n);
  vector<int> nxt(n);
  vector<int> num(n);
  vector<int> changed(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = n - 1; i >= 0; --i) {
    if (i + a[i] >= n) {
      nxt[i] = i;
      isterm[i] = 1;
    } else {
      if (isterm[i + a[i]] || (i + a[i]) / len > i / len) {
        num[i] = 1;
        nxt[i] = i + a[i];
      } else {
        num[i] = 1 + num[i + a[i]];
        nxt[i] = nxt[i + a[i]];
      }
    }
  }
  for (int i = 0; i < m; ++i) {
    int type;
    cin >> type;
    if (type == 0) {
      int x, y;
      cin >> x >> y;
      --x;
      a[x] = y;
      changed[x] = 1;
      if (x + a[x] >= n) {
        isterm[x] = 1;
        nxt[x] = x;
        num[x] = 0;
      } else {
        isterm[x] = 0;
        if (isterm[x + a[x]] || (x + a[x]) / len > x / len) {
          num[x] = 1;
          nxt[x] = x + a[x];
        } else {
          num[x] = 1 + num[x + a[x]];
          nxt[x] = nxt[x + a[x]];
        }
      }
      for (int j = x - 1; j >= 0 && j / len == x / len; --j) {
        if (j + a[j] < n && changed[j + a[j]]) {
          changed[j] = 1;
          num[j] = 1 + num[j + a[j]];
          nxt[j] = nxt[j + a[j]];
        }
      }
      for (int j = x; j >= 0 && j / len == x / len; --j) changed[j] = 0;
    } else {
      int x;
      cin >> x;
      --x;
      int ans = 0;
      while (!isterm[x] && nxt[x] != x) {
        ans += num[x];
        x = nxt[x];
      }
      cout << x + 1 << " " << ans + 1 << "\n";
    }
  }
  return 0;
}
