Let D(x) be the number of positive divisors of a positive integer x. For example, D(2) = 2 (2 is divisible by 1 and 2), D(6) = 4 (6 is divisible by 1, 2, 3 and 6).

You are given an array a of n integers. You have to process two types of queries:

  1. REPLACE l r — for every <image> replace ai with D(ai); 
  2. SUM l r — calculate <image>. 



Print the answer for each SUM query.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 3·105) — the number of elements in the array and the number of queries to process, respectively.

The second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 106) — the elements of the array.

Then m lines follow, each containing 3 integers ti, li, ri denoting i-th query. If ti = 1, then i-th query is REPLACE li ri, otherwise it's SUM li ri (1 ≤ ti ≤ 2, 1 ≤ li ≤ ri ≤ n).

There is at least one SUM query.

Output

For each SUM query print the answer to it.

Example

Input

7 6
6 4 1 10 3 2 4
2 1 7
2 4 5
1 3 5
2 4 4
1 5 7
2 1 7


Output

30
13
4
22
#include <bits/stdc++.h>
const long long A = 1e4 + 7;
const long long B = 1e5 + 7;
const long long C = 1e6 + 7;
const long long D = 1e7 + 7;
const long long mod = 1e9 + 7;
const long long INF = 0x3f3f3f3f;
long long n, m, a[B << 2], d[C];
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
namespace Seg {
struct node {
  long long l, r, mid, sum, max;
} t[B << 4];
void push_up(long long p) {
  t[p].sum = t[p << 1].sum + t[p << 1 | 1].sum;
  t[p].max = ((t[p << 1].max) > (t[p << 1 | 1].max) ? (t[p << 1].max)
                                                    : (t[p << 1 | 1].max));
}
void build(long long p, long long l, long long r) {
  t[p].l = l;
  t[p].r = r;
  t[p].mid = l + r >> 1;
  if (l == r) {
    t[p].sum = t[p].max = a[l];
    return;
  }
  build(p << 1, l, t[p].mid);
  build(p << 1 | 1, t[p].mid + 1, r);
  push_up(p);
}
void up_date(long long p, long long l, long long r) {
  if (t[p].l == t[p].r && l <= t[p].l && t[p].r <= r) {
    t[p].sum = t[p].max = d[t[p].sum];
    return;
  }
  if (l <= t[p].mid && t[p << 1].max > 2) up_date(p << 1, l, r);
  if (r > t[p].mid && t[p << 1 | 1].max > 2) up_date(p << 1 | 1, l, r);
  push_up(p);
}
long long query(long long p, long long l, long long r) {
  if (l <= t[p].l && t[p].r <= r) return t[p].sum;
  long long res = 0;
  if (l <= t[p].mid) res += query(p << 1, l, r);
  if (r > t[p].mid) res += query(p << 1 | 1, l, r);
  return res;
}
}  // namespace Seg
signed main() {
  n = read();
  m = read();
  for (long long i = 1; i <= 1e6; i++)
    for (long long j = i; j <= 1e6; j += i) d[j]++;
  for (long long i = 1; i <= n; i++) a[i] = read();
  Seg::build(1, 1, n);
  for (long long i = 1; i <= m; i++) {
    long long opt = read(), x = read(), y = read();
    if (opt == 1) Seg::up_date(1, x, y);
    if (opt == 2) printf("%lld\n", Seg::query(1, x, y));
  }
  return 0;
}
