#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int INF = 1e9;
const double inf = 1e15;
const double eps = 1e-9;
const long long MOD = 1e9 + 7;
long long toNum(string s) {
  stringstream ss(s);
  long long ret;
  ss >> ret;
  return ret;
}
string toString(long long x) {
  stringstream ss;
  ss << x;
  return ss.str();
}
long long mulMod(long long a, long long b) { return (a * b) % MOD; }
long long addMod(long long a, long long b) { return (a + b) % MOD; }
long long redMod(long long a, long long b) {
  return addMod(addMod(a, -b), MOD);
}
long long fast(long long a, long long b) {
  if (b == 0) return 1;
  long long tmp = fast(a, b / 2);
  tmp = mulMod(tmp, tmp);
  if (b & 1) tmp = mulMod(tmp, a);
  return tmp;
}
long long GCD(long long a, long long b) {
  if (a == 0) return b;
  return GCD(b % a, a);
}
const int N = 1e5 + 5;
const int BLOCK = 300;
const int CBLOCK = N / BLOCK + 5;
pair<int, int> jmp[N];
int arr[N];
int n, q;
vector<pair<int, int> > lst;
pair<int, int> query(int x) {
  int cur = x;
  int nxt = jmp[cur].first;
  int nod = x, val = 1;
  while (cur != nxt) {
    val += jmp[cur].second;
    nod = nxt;
    cur = nxt;
    nxt = jmp[cur].first;
  }
  return make_pair(nod, val);
}
void update(int a, int b) {
  arr[a] = b;
  int idx = (a - 1) / BLOCK;
  int st = idx * BLOCK + 1;
  int en = min(n, (idx + 1) * BLOCK);
  for (int i = en; i >= st; i -= 1) {
    int nxt = i + arr[i];
    nxt = min(nxt, n + 1);
    if (nxt == n + 1) {
      jmp[i] = make_pair(i, 0);
    } else {
      if ((nxt - 1) / BLOCK != idx) {
        jmp[i] = make_pair(nxt, 1);
      } else {
        jmp[i] = make_pair(jmp[nxt].first, jmp[nxt].second + 1);
      }
    }
  }
}
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> q;
  for (int i = 1; i <= n; i += 1) cin >> arr[i];
  for (int i = n; i >= 1; i -= 1) {
    int nxt = i + arr[i];
    nxt = min(nxt, n + 1);
    if (nxt == n + 1) {
      jmp[i] = make_pair(i, 0);
    } else {
      if ((nxt - 1) / BLOCK != (i - 1) / BLOCK) {
        jmp[i] = make_pair(nxt, 1);
      } else {
        jmp[i] = make_pair(jmp[nxt].first, jmp[nxt].second + 1);
      }
    }
  }
  int ins, a, b;
  for (int i = 1; i <= q; i += 1) {
    cin >> ins >> a;
    if (ins == 0) {
      cin >> b;
      update(a, b);
    } else {
      pair<int, int> ans = query(a);
      cout << ans.first << " " << ans.second << endl;
    }
  }
  return 0;
}
