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 int a[300005], tree[4 * 300005], div1[1000005], fl[4 * 300005];
void build(long long int start, long long int end, long long int pos) {
  if (start == end) {
    tree[pos] = a[start];
    fl[pos] = (tree[pos] <= 2) ? 0 : 1;
    return;
  }
  long long int mid = (start + end) / 2;
  build(start, mid, 2 * pos);
  build(mid + 1, end, 2 * pos + 1);
  tree[pos] = tree[2 * pos] + tree[2 * pos + 1];
  fl[pos] = fl[2 * pos] | fl[2 * pos + 1];
}
void update(long long int start, long long int end, long long int pos,
            long long int l, long long int r) {
  if (start > end || start > r || end < l) return;
  if (start == end) {
    a[start] = div1[a[start]];
    tree[pos] = a[start];
    fl[pos] = (tree[pos] <= 2) ? 0 : 1;
    return;
  }
  if (fl[pos] == 0) return;
  long long int mid = (start + end) / 2;
  update(start, mid, 2 * pos, l, r);
  update(mid + 1, end, 2 * pos + 1, l, r);
  tree[pos] = tree[2 * pos] + tree[2 * pos + 1];
  fl[pos] = fl[2 * pos] | fl[2 * pos + 1];
}
long long int query(long long int start, long long int end, long long int pos,
                    long long int l, long long int r) {
  if (start > end || start > r || end < l) return 0;
  if (start >= l && end <= r) return tree[pos];
  long long int mid = (start + end) / 2, p1 = 0, p2 = 0;
  if (l <= mid) p1 = query(start, mid, 2 * pos, l, r);
  if (r > mid) p2 = query(mid + 1, end, 2 * pos + 1, l, r);
  return (p1 + p2);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  long long int n, m, x, y, z, i, j;
  for (i = 1; i <= 1000000; i++)
    for (j = i; j <= 1000000; j += i) div1[j]++;
  cin >> n >> m;
  for (i = 1; i <= n; i++) cin >> a[i];
  build(1, n, 1);
  while (m--) {
    cin >> x;
    if (x == 1) {
      cin >> y >> z;
      update(1, n, 1, y, z);
    } else {
      cin >> y >> z;
      cout << query(1, n, 1, y, z) << "\n";
    }
  }
  return 0;
}
