#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void inp(T &any) {
  cin >> any;
}
template <typename T, typename... U>
inline void inp(T &a, U &...b) {
  cin >> a;
  inp(b...);
}
template <typename T>
inline istream &operator>>(istream &in, vector<T> &a) {
  for (auto &x : a) in >> x;
  return in;
}
template <typename T, typename U>
inline istream &operator>>(istream &in, pair<T, U> &a) {
  in >> a.first >> a.second;
  return in;
}
const int mx = 2e5 + 5;
vector<int> Power(mx), Count(mx), Next(mx), b(mx);
void issue(int n) {
  for (int i = (0); i < (n); i++) 11;
}
void solve(int &T) {
  int n, q;
  cin >> n >> q;
  const int block_size = ceil(sqrt(n)) + 1;
  for (int i = 0; i < n; i++) {
    cin >> Power[i];
    b[i] = i / block_size;
    Count[i] = 0;
    Next[i] = n + 1;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (i + Power[i] < n and b[i] == b[i + Power[i]]) {
      Next[i] = Next[i + Power[i]];
      Count[i] = Count[i + Power[i]] + 1;
    } else {
      Next[i] = i + Power[i];
      Count[i] = 1;
    }
  }
  while (q--) {
    int type;
    cin >> type;
    if (type == 1) {
      int id;
      cin >> id;
      id--;
      int j = id, cnt = 0;
      while (j < n and Next[j] < n) {
        cnt += Count[j];
        j = Next[j];
      }
      while (j < n and j + Power[j] < n) {
        cnt++;
        j += Power[j];
      }
      j++, cnt++;
      cout << j << " " << cnt << '\n';
    } else {
      int id, val;
      cin >> id >> val;
      id--;
      Power[id] = val;
      int j = id;
      while (j >= 0 and b[j] == b[id]) {
        if (j + Power[j] < n and b[j] == b[j + Power[j]]) {
          Next[j] = Next[j + Power[j]];
          Count[j] = Count[j + Power[j]] + 1;
        } else {
          Next[j] = j + Power[j];
          Count[j] = 1;
        }
        j--;
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  for (int Case = (1); Case < (t + 1); Case++) {
    if (0) cerr << "Case #" << Case << "\n";
    solve(Case);
  }
  return 0;
}
