#include <bits/stdc++.h>
using namespace std;
template <class T, class S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  return os << "(" << v.first << ", " << v.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (int i = int(0); i <= int((static_cast<int>((v).size())) - 1); ++i) {
    if (i) os << ", ";
    os << v[i];
  }
  return os << "]";
}
template <class T>
bool setmax(T& _a, T _b) {
  if (_b > _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
bool setmin(T& _a, T _b) {
  if (_b < _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
T gcd(T _a, T _b) {
  return _b == 0 ? _a : gcd(_b, _a % _b);
}
const int N = 100000;
const int Q = 300;
pair<int, int> jump[N];
int ptr[N];
int n;
void calc_jump(int i) {
  if (ptr[i] < 0) {
    jump[i] = make_pair(i, 0);
  } else if (ptr[i] / Q > i / Q) {
    jump[i] = make_pair(ptr[i], 1);
  } else {
    jump[i] = jump[ptr[i]];
    ++jump[i].second;
  }
}
pair<int, int> answer(int i) {
  int cnt = 0;
  while (1) {
    if (jump[i].first == i) {
      return make_pair(i, cnt);
    }
    cnt += jump[i].second;
    i = jump[i].first;
  }
}
int main() {
  int m;
  scanf("%d%d", &n, &m);
  for (int i = int(0); i <= int((n)-1); ++i) {
    int a;
    scanf("%d", &a);
    ptr[i] = i + a;
    if (ptr[i] >= n) ptr[i] = -1;
  }
  for (int i = int((n)-1); i >= int(0); --i) calc_jump(i);
  while (m--) {
    int op, i;
    scanf("%d%d", &op, &i);
    --i;
    if (op == 0) {
      int a;
      scanf("%d", &a);
      ptr[i] = i + a;
      if (ptr[i] >= n) ptr[i] = -1;
      for (int j = int((i + 1) - 1); j >= int(i / Q * Q); --j) calc_jump(j);
    } else {
      pair<int, int> r = answer(i);
      printf("%d %d\n", r.first + 1, r.second + 1);
    }
  }
  return 0;
}
