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;
int d[1000005];
struct stree {
  long long sum;
  long long mx;
} sts[300002 * 4];
long long a[1000005];
void pushup(int root) {
  sts[root].sum = sts[root << 1].sum + sts[root << 1 | 1].sum;
  sts[root].mx = max(sts[root << 1].mx, sts[root << 1 | 1].mx);
}
void init() {
  for (int i = 1; i <= 1000000; i++)
    for (int j = i; j <= 1000000; j += i) d[j]++;
}
void build(int l, int r, int root) {
  if (l == r) {
    sts[root].sum = sts[root].mx = a[l];
  } else {
    int mid = (l + r) >> 1;
    build(l, mid, root << 1);
    build(mid + 1, r, root << 1 | 1);
    pushup(root);
  }
}
void update(int nowl, int nowr, int ul, int ur, int root) {
  if (nowl == nowr) {
    sts[root].mx = sts[root].sum = d[sts[root].sum];
    return;
  }
  if (ul <= nowl && ur >= nowr && sts[root].mx <= 2) return;
  int mid = (nowl + nowr) >> 1;
  if (ul <= mid) update(nowl, mid, ul, ur, root << 1);
  if (ur > mid) update(mid + 1, nowr, ul, ur, root << 1 | 1);
  pushup(root);
}
long long query(int nowl, int nowr, int ql, int qr, int root) {
  if (ql <= nowl && qr >= nowr) {
    return sts[root].sum;
  } else {
    int mid = (nowl + nowr) >> 1;
    long long ans = 0;
    if (ql <= mid) ans += query(nowl, mid, ql, qr, root << 1);
    if (qr > mid) ans += query(mid + 1, nowr, ql, qr, root << 1 | 1);
    return ans;
  }
}
void op();
int main() {
  init();
  int n, m;
  int t, l, r;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  build(1, n, 1);
  for (int i = 1; i <= m; i++) {
    scanf("%d %d %d", &t, &l, &r);
    if (t == 1) {
      update(1, n, l, r, 1);
    } else {
      printf("%I64d\n", query(1, n, l, r, 1));
    }
  }
}
void sp(int t) {
  for (int i = 1; i <= t; i++) printf(" ");
}
void op() {
  int pow2[10] = {1, 2, 4, 8, 16, 32};
  int n = 16;
  printf("\n///////////\n");
  for (int i = 1; i <= 31; i++) {
    if (i == pow2[0]) sp(15);
    if (i == pow2[1]) sp(7);
    if (i == pow2[2]) sp(3);
    if (i == pow2[3]) sp(1);
    if (i > pow2[1] && i < pow2[2]) sp(15);
    if (i > pow2[2] && i < pow2[3]) sp(7);
    if (i > pow2[3] && i < pow2[4]) sp(3);
    if (i > pow2[4] && i < pow2[5]) sp(1);
    printf("%d", sts[i].mx);
    if ((i == pow2[1] - 1) || (i == pow2[2] - 1) || (i == pow2[3] - 1) ||
        (i == pow2[4] - 1))
      printf("\n");
  }
  printf("\n\n///////////\n");
}
