#include <bits/stdc++.h>
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2")
using namespace std;
template <class T, class U>
inline void checkmin(T &x, U y) {
  if (y < x) x = y;
}
template <class T, class U>
inline void checkmax(T &x, U y) {
  if (y > x) x = y;
}
template <class T, class U>
inline bool ifmax(T &x, U y) {
  if (y > x) return x = y, true;
  return false;
}
template <class T, class U>
inline bool ifmin(T &x, U y) {
  if (y < x) return x = y, true;
  return false;
}
template <class T>
inline void sort(T &a) {
  sort(a.begin(), a.end());
}
template <class T>
inline void rsort(T &a) {
  sort(a.rbegin(), a.rend());
}
template <class T>
inline void reverse(T &a) {
  reverse(a.begin(), a.end());
}
template <class T, class U>
inline istream &operator>>(istream &str, pair<T, U> &p) {
  return str >> p.first >> p.second;
}
template <class T>
inline istream &operator>>(istream &str, vector<T> &a) {
  for (auto &i : a) str >> i;
  return str;
}
const int B = 500;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(12);
  srand(94385);
  int n, m;
  cin >> n >> m;
  vector<int> block(n), link(n);
  for (int i = 0; i < n; ++i) {
    cin >> link[i];
    link[i] += i;
    block[i] = i / B;
  }
  vector<int> inside(n);
  vector<int> cnt(n);
  for (int i = n - 1; i >= 0; --i) {
    cnt[i] = 0;
    inside[i] = i;
    if (link[i] < n && block[link[i]] == block[i]) {
      inside[i] = inside[link[i]];
      cnt[i] = cnt[link[i]] + 1;
    }
  }
  while (m--) {
    int mode;
    cin >> mode;
    if (mode == 0) {
      int a, b;
      cin >> a >> b;
      --a;
      link[a] = a + b;
      for (int i = min(n, block[a] * B + B) - 1; i >= block[a] * B; --i) {
        cnt[i] = 0;
        inside[i] = i;
        if (link[i] < n && block[link[i]] == block[i]) {
          inside[i] = inside[link[i]];
          cnt[i] = cnt[link[i]] + 1;
        }
      }
    } else {
      int a;
      cin >> a;
      --a;
      int ans = -1, len = 0;
      while (a < n) {
        ans = a;
        len += cnt[a];
        a = inside[a];
        if (a < n) ans = a;
        a = link[a];
        ++len;
      }
      cout << ans + 1 << ' ' << len << '\n';
    }
  }
  return 0;
}
