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;
vector<long long> cnt;
vector<long long> st1, st2, v;
int n, m;
void build(int id, int l, int r) {
  if (l == r) {
    st1[id] = v[l];
    st2[id] = v[l];
    return;
  }
  int mid = (l + r) / 2;
  build(2 * id + 1, l, mid);
  build(2 * id + 2, mid + 1, r);
  st1[id] = st1[2 * id + 1] + st1[2 * id + 2];
  st2[id] = max(st2[2 * id + 1], st2[2 * id + 2]);
}
void update(int low, int high, int id, int l, int r) {
  if (l > high || r < low) return;
  if (st2[id] <= 2) return;
  if (l == r) {
    v[l] = cnt[v[l]];
    st1[id] = v[l];
    st2[id] = v[l];
    return;
  }
  int mid = (l + r) / 2;
  update(low, high, 2 * id + 1, l, mid);
  update(low, high, 2 * id + 2, mid + 1, r);
  st1[id] = st1[2 * id + 1] + st1[2 * id + 2];
  st2[id] = max(st2[2 * id + 1], st2[2 * id + 2]);
}
long long query(int low, int high, int id, int l, int r) {
  if (l > high || r < low) return 0;
  if (l >= low && r <= high) return st1[id];
  int mid = (l + r) / 2;
  return query(low, high, 2 * id + 1, l, mid) +
         query(low, high, 2 * id + 2, mid + 1, r);
}
void solve(int test) {
  cin >> n >> m;
  st1.resize(4 * n);
  st2.resize(4 * n);
  v.resize(n);
  long long i, j;
  for (i = 0; i < n; i++) cin >> v[i];
  build(0, 0, n - 1);
  while (m--) {
    int t, l, r;
    cin >> t >> l >> r;
    l--;
    r--;
    if (t == 1) {
      update(l, r, 0, 0, n - 1);
    } else {
      long long ans = query(l, r, 0, 0, n - 1);
      cout << ans << endl;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cnt.resize(1e6 + 5, 1);
  for (int i = 2; i <= 1e6; i++) {
    for (int j = i; j <= 1e6; j += i) cnt[j]++;
  }
  int t = 1;
  for (int x = 1; x <= t; x++) {
    solve(x);
  }
  return 0;
}
