#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)2 * 1e9;
const long long MOD = (long long)1e9 + 7;
const long long P = 239;
const long long MAX_N = 100000;
const long long ABC = 26;
const long double pi = 3.1415926535897932384626;
const long double eps = 1e-6;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int sz = round(sqrt(n));
  int a[n];
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  pair<int, int> b[n];
  for (int i = 0; i < n; i += sz)
    for (int j = min(n - 1, i + sz - 1); j >= i; j--)
      if (j + a[j] >= min(n, i + sz))
        b[j] = {1, j};
      else
        b[j] = {1 + b[j + a[j]].first, b[j + a[j]].second};
  for (int i = 0; i < m; i++) {
    int t;
    scanf("%d", &t);
    if (t == 0) {
      int x, v;
      scanf("%d %d", &x, &v);
      x--;
      a[x] = v;
      for (int j = min(n - 1, x / sz * sz + sz - 1); j >= x / sz * sz; j--)
        if (j + a[j] >= min(n, x / sz * sz + sz))
          b[j] = {1, j};
        else
          b[j] = {1 + b[j + a[j]].first, b[j + a[j]].second};
    } else {
      int x;
      scanf("%d", &x);
      x--;
      int cnt = 0;
      while (true) {
        int y = b[x].second;
        cnt += b[x].first;
        if (y + a[y] >= n) {
          printf("%d %d\n", y + 1, cnt);
          break;
        }
        x = y + a[y];
      }
    }
  }
  return 0;
}
