#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  scanf("%d%d", &n, &m);
  int arr[n], dp[n], index[n], i;
  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    dp[i] = 0;
    index[i] = -1;
  }
  int c = sqrt(n);
  int x = n / c, a, b, p;
  while (x >= 0) {
    a = x * c;
    b = min(n - 1, (x + 1) * c - 1);
    index[b] = b;
    dp[b] = 1;
    for (i = b - 1; i >= a; i--) {
      if (i + arr[i] > b) {
        dp[i] = 1;
        index[i] = i;
      } else {
        dp[i] = dp[arr[i] + i] + 1;
        index[i] = index[arr[i] + i];
      }
    }
    x--;
  }
  while (m--) {
    scanf("%d", &p);
    if (p == 0) {
      scanf("%d%d", &a, &b);
      a--;
      arr[a] = b;
      x = a / c;
      b = a;
      a = x * c;
      int nxt = min(n - 1, a + c - 1);
      for (i = b; i >= a; i--) {
        if (i + arr[i] > nxt) {
          dp[i] = 1;
          index[i] = i;
        } else {
          dp[i] = dp[arr[i] + i] + 1;
          index[i] = index[arr[i] + i];
        }
      }
    } else if (p == 1) {
      scanf("%d", &a);
      a--;
      b = 0;
      while (a < n) {
        i = a;
        b += dp[a];
        if (a == index[a])
          a = a + arr[a];
        else
          a = index[a] + arr[index[a]];
      }
      if (index[i] < n) i = index[i];
      printf("%d %d\n", i + 1, b);
    }
  }
}
