#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;
const double PI = acos(-1.0);
const int INF = 1e9;
const int MOD = INF + 7;
const double EPS = 1e-9;
const long long BIGINF = 1e17;
mt19937 rng(time(0));
uniform_int_distribution<int> uid(0, INF / 2);
int p[100005], cnt[100005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, a, b, x;
  cin >> n >> m;
  vector<int> v(n);
  int k = sqrt(2 * n) + 1;
  fill(p, p + n, INF);
  for (auto& i : v) cin >> i;
  for (int i = n - 1; i >= 0; --i) {
    if (i + v[i] < n && (i + v[i]) / k == i / k) {
      cnt[i] = cnt[i + v[i]] + 1;
      if (p[i + v[i]] == INF)
        p[i] = i + v[i];
      else
        p[i] = p[i + v[i]];
    }
  }
  while (m--) {
    cin >> x;
    if (x) {
      cin >> a;
      --a;
      int res = 0;
      while (a < n) {
        if (p[a] == INF)
          x = a;
        else
          x = p[a], res += cnt[a], a = p[a];
        a += v[a];
        ++res;
      }
      cout << x + 1 << " " << res << '\n';
    } else {
      cin >> a >> b;
      --a;
      v[a] = b;
      for (int i = a; i >= (a / k) * k; --i) {
        if (i + v[i] < n && (i + v[i]) / k == a / k) {
          cnt[i] = cnt[i + v[i]] + 1;
          if (p[i + v[i]] == INF)
            p[i] = i + v[i];
          else
            p[i] = p[i + v[i]];
        } else
          p[i] = INF, cnt[i] = 0;
      }
    }
  }
  return 0;
}
