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;
const int MOD = 1e9 + 7;
int day[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
template <typename T>
inline bool isLeap(T y) {
  return (y % 400 == 0) || (y % 100 ? y % 4 == 0 : false);
}
template <typename T>
inline T GCD(T a, T b) {
  a = abs(a);
  b = abs(b);
  if (a < b) swap(a, b);
  while (b) {
    a = a % b;
    swap(a, b);
  }
  return a;
}
template <typename T>
inline T EGCD(T a, T b, T &x, T &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  T x1, y1;
  T d = EGCD(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
template <typename T>
inline T LCM(T x, T y) {
  T tp = GCD(x, y);
  if ((x / tp) * 1. * y > 9e18) return 9e18;
  return (x / tp) * y;
}
template <typename T>
inline T BigMod(T A, T B, T M = MOD) {
  T ret = 1;
  while (B) {
    if (B & 1) ret = (ret * A) % M;
    A = (A * A) % M;
    B = B >> 1;
  }
  return ret;
}
template <typename T>
inline T InvMod(T A, T M = MOD) {
  return BigMod(A, M - 2, M);
}
template <typename T>
void Compress(T *in, int n, int f = 0) {
  vector<T> vv;
  for (int i = f; i < n + f; i++) vv.push_back(in[i]);
  sort(vv.begin(), vv.end()), vv.erase(unique(vv.begin(), vv.end()), vv.end());
  for (int i = f; i < n + f; i++)
    in[i] = lower_bound(vv.begin(), vv.end(), in[i]) - vv.begin();
}
template <typename T>
T scani(T &n) {
  n = 0;
  bool negative = false;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') negative = true;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    n = n * 10 + c - 48;
    c = getchar();
  }
  if (negative) n = ~(n - 1);
  return n;
}
template <typename T>
void write(T n, int type = true) {
  if (n < 0) {
    putchar('-');
    n = -n;
  }
  if (!n) {
    putchar('0');
    if (type == 32)
      putchar(' ');
    else if (type)
      putchar('\n');
    return;
  }
  char buff[22];
  int len = 0;
  while (n) buff[len++] = n % 10 + 48, n /= 10;
  for (int i = len - 1; i >= 0; i--) putchar(buff[i]);
  if (type == 32)
    putchar(' ');
  else if (type)
    putchar('\n');
}
int scans(char *a) {
  int i = 0;
  char c = 0;
  while (c < 33) c = getchar();
  while (c > 33) {
    a[i++] = c;
    c = getchar();
  }
  a[i] = 0;
  return i;
}
template <typename T>
inline T SqrDis(T x1, T y1, T x2, T y2) {
  return ((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2));
}
template <typename T>
inline T Area2(T Ax, T Ay, T Bx, T By, T Cx, T Cy) {
  T ret = Ax * (By - Cy) + Bx * (Cy - Ay) + Cx * (Ay - By);
  if (ret < 0) return ret = -ret;
  return ret;
}
const int N = 2000006;
const int M = 200005;
const unsigned long long hs = 3797;
const int base = 333;
int dv[N];
int Mx[N * 4];
long long T[N * 4];
long long in[N];
int n, qr;
inline void built(int node, int b, int e) {
  if (b == e) {
    T[node] = in[b];
    Mx[node] = in[b];
    return;
  }
  int mid = b + e >> 1;
  int lf = node << 1;
  int rt = lf | 1;
  built(lf, b, mid);
  built(rt, mid + 1, e);
  T[node] = T[lf] + T[rt];
  Mx[node] = max(Mx[lf], Mx[rt]);
}
inline void update(int node, int b, int e, int i, int j) {
  if (b > j || e < i) return;
  if (b == i && e == j) {
    if (Mx[node] < 3) {
      return;
    }
  }
  if (b == e) {
    Mx[node] = T[node] = dv[T[node]];
    return;
  }
  int mid = b + e >> 1;
  int lf = node << 1;
  int rt = lf | 1;
  if (j <= mid)
    update(lf, b, mid, i, j);
  else if (mid < i)
    update(rt, mid + 1, e, i, j);
  else {
    update(lf, b, mid, i, mid);
    update(rt, mid + 1, e, mid + 1, j);
  }
  T[node] = T[lf] + T[rt];
  Mx[node] = max(Mx[lf], Mx[rt]);
}
inline long long query(int node, int b, int e, int i, int j) {
  if (b > j || e < i) return 0;
  if (b >= i && e <= j) return T[node];
  int mid = b + e >> 1;
  int lf = node << 1;
  int rt = lf | 1;
  if (j <= mid)
    return query(lf, b, mid, i, j);
  else if (mid < i)
    return query(rt, mid + 1, e, i, j);
  else {
    return query(lf, b, mid, i, mid) + query(rt, mid + 1, e, mid + 1, j);
  }
}
int main() {
  for (int i = 1; i < N; i++)
    for (int j = i; j < N; j += i) dv[j]++;
  scani(n), scani(qr);
  for (int i = 1; i <= n; i++) scani(in[i]);
  built(1, 1, n);
  while (qr--) {
    int t, l, r;
    scani(t), scani(l), scani(r);
    if (t == 1)
      update(1, 1, n, l, r);
    else
      write(query(1, 1, n, l, r));
  }
  return 0;
}
