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>
using namespace std;
long long n, m;
long long d[1000001], a[(long long)3e5 + 1];
long long st[4 * (long long)3e5 + 1];
long long stm[4 * (long long)3e5 + 1];
void build(long long v, long long l, long long r) {
  if (l == r)
    st[v] = a[l], stm[v] = a[l];
  else {
    long long m = (l + r) / 2;
    build(v * 2, l, m);
    build(v * 2 + 1, m + 1, r);
    st[v] = st[v * 2] + st[v * 2 + 1];
    stm[v] = max(st[v * 2], st[v * 2 + 1]);
  }
}
long long sum(long long v, long long l, long long r, long long ql,
              long long qr) {
  if (ql > r || qr < l) return 0;
  if (l >= ql && r <= qr) return st[v];
  long long m = (l + r) / 2;
  return sum(v * 2, l, m, ql, qr) + sum(v * 2 + 1, m + 1, r, ql, qr);
}
void updateRange(long long v, long long l, long long r, long long ql,
                 long long qr) {
  if (stm[v] <= 2) return;
  if (l > r || l > qr || r < ql) return;
  if (l == r) {
    st[v] = d[st[v]];
    stm[v] = st[v];
    return;
  }
  long long m = (l + r) / 2;
  updateRange(v * 2, l, m, ql, qr);
  updateRange(v * 2 + 1, m + 1, r, ql, qr);
  st[v] = st[v * 2] + st[v * 2 + 1];
  stm[v] = max(stm[v * 2], stm[v * 2 + 1]);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  for (long long i = 1; i < 1000001; i++)
    for (long long j = i; j < 1000001; j += i) d[j]++;
  cin >> n >> m;
  for (long long i = 0; i < n; i++) cin >> a[i];
  build(1, 0, n - 1);
  for (long long j = 0; j < m; j++) {
    long long t, l, r;
    cin >> t >> l >> r;
    if (t == 1) {
      updateRange(1, 0, n - 1, l - 1, r - 1);
    } else {
      long long ans = sum(1, 0, n - 1, l - 1, r - 1);
      cout << ans << "\n";
    }
  }
}
