#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void remax(T& A, T B) {
  if (A < B) A = B;
}
template <class T>
inline void remin(T& A, T B) {
  if (A > B) A = B;
}
string ToString(long long num) {
  string ret;
  bool neg = false;
  if (num < 0) num *= ~0, neg = true;
  do {
    ret += ((num % 10) + '0');
    num /= 10;
  } while (num);
  if (neg) ret += '-';
  reverse(ret.begin(), ret.end());
  return ret;
}
long long ToNumber(string s) {
  long long r = 0, p = 1;
  int e = (s[0] == '-');
  for (int i = (int)s.size() - 1; i >= e; --i) r += (s[i] - '0') * p, p *= 10;
  if (e) r *= ~0;
  return r;
}
long long Gcd(long long a, long long b) {
  while (a %= b ^= a ^= b ^= a)
    ;
  return b;
}
long long Power(long long base, unsigned long long power) {
  long long ret = 1;
  while (power) {
    if (power & 1) ret *= base;
    power >>= 1;
    base *= base;
  }
  return ret;
}
long long PowerMod(long long base, unsigned long long power, long long mod) {
  if (!power) return 1 % mod;
  if (power & 1) return (base * PowerMod(base, power - 1, mod)) % mod;
  return PowerMod((base * base) % mod, power >> 1, mod);
}
int Log(long long num, long long base) {
  int ret = 0;
  while (num) {
    ++ret;
    num /= base;
  }
  return ret;
}
int arr[100001];
int nxt[100001];
int jmp[100001];
inline void run() {
  int n, m, sq;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n;) scanf("%d", arr + i++);
  sq = (int)sqrt(n);
  remax(sq, 1);
  for (int i = n; i; --i) {
    int upper = (i / sq + 1) * sq;
    remin(--upper, n);
    nxt[i] = i + arr[i];
    jmp[i] = 1;
    if (nxt[i] <= upper) {
      jmp[i] += jmp[nxt[i]];
      nxt[i] = nxt[nxt[i]];
    }
  }
  while (m--) {
    int z, a;
    scanf("%1d%d", &z, &a);
    if (!z) {
      int b, cur = a / sq, upper = (cur + 1) * sq;
      scanf("%d", &b);
      arr[a] = b;
      remin(--upper, n);
      while (true) {
        nxt[a] = a + arr[a];
        jmp[a] = 1;
        if (nxt[a] <= upper) {
          jmp[a] += jmp[nxt[a]];
          nxt[a] = nxt[nxt[a]];
        }
        --a;
        if (!a || a / sq != cur) break;
      }
    } else {
      int ans = 1;
      while (a <= n && nxt[a] <= n) {
        ans += jmp[a];
        a = nxt[a];
      }
      while (a <= n && a + arr[a] <= n) {
        a += arr[a];
        ++ans;
      }
      printf("%d %d\n", a, ans);
    }
  }
}
int main() {
  FILE* inut = stdin;
  FILE* outut = stdout;
  while (!feof(inut)) {
    run();
    break;
  }
  return 0;
}
