#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 100;
const long long SQ = 300;
long long a[N], n;
pair<long long, long long> dp[N];
void relax(long long xl, long long xr) {
  for (long long i = xr - 1; i >= xl; i--) {
    if (a[i] + i >= xr) {
      dp[i] = make_pair(a[i] + i, 1);
    } else {
      dp[i] = dp[a[i] + i];
      dp[i].second++;
    }
  }
}
void build() {
  for (long long xl = 0; xl < n; xl += SQ) {
    long long xr = min(xl + SQ, n);
    relax(xl, xr);
  }
}
void UPD(long long x, long long val) {
  a[x] = val;
  for (long long xl = 0; xl < n; xl += SQ) {
    long long xr = min(n, xl + SQ);
    if (x >= xl && x < xr) {
      relax(xl, xr);
    }
  }
}
pair<long long, long long> get(long long x) {
  long long ans = 0, pre = x;
  while (x < n) {
    ans += dp[x].second;
    pre = x;
    x = dp[x].first;
  }
  while (pre + a[pre] < n) {
    pre = pre + a[pre];
  }
  return make_pair(pre, ans);
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long q;
  cin >> n >> q;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  build();
  for (long long _ = 0, t, x, val; _ < q; _++) {
    cin >> t;
    if (t == 0) {
      cin >> x >> val;
      x--;
      UPD(x, val);
    } else {
      cin >> x;
      x--;
      pair<long long, long long> tmp = get(x);
      cout << tmp.first + 1 << " " << tmp.second << "\n";
    }
  }
  cout << "\n";
  return 0;
}
