Vova again tries to play some computer card game.

The rules of deck creation in this game are simple. Vova is given an existing deck of n cards and a magic number k. The order of the cards in the deck is fixed. Each card has a number written on it; number ai is written on the i-th card in the deck.

After receiving the deck and the magic number, Vova removes x (possibly x = 0) cards from the top of the deck, y (possibly y = 0) cards from the bottom of the deck, and the rest of the deck is his new deck (Vova has to leave at least one card in the deck after removing cards). So Vova's new deck actually contains cards x + 1, x + 2, ... n - y - 1, n - y from the original deck.

Vova's new deck is considered valid iff the product of all numbers written on the cards in his new deck is divisible by k. So Vova received a deck (possibly not a valid one) and a number k, and now he wonders, how many ways are there to choose x and y so the deck he will get after removing x cards from the top and y cards from the bottom is valid?

Input

The first line contains two integers n and k (1 ≤ n ≤ 100 000, 1 ≤ k ≤ 109).

The second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 109) — the numbers written on the cards.

Output

Print the number of ways to choose x and y so the resulting deck is valid.

Examples

Input

3 4
6 2 8


Output

4


Input

3 6
9 1 14


Output

1

Note

In the first example the possible values of x and y are:

  1. x = 0, y = 0; 
  2. x = 1, y = 0; 
  3. x = 2, y = 0; 
  4. x = 0, y = 1. 
#include <bits/stdc++.h>
int dr[] = {2, 2, -2, -2, 1, -1, 1, -1};
int dc[] = {1, -1, 1, -1, 2, 2, -2, -2};
int dr1[] = {0, 0, 0, 1, 1, 1, -1, -1, -1};
int dc1[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
int dr2[] = {0, 0, 1, -1};
int dc2[] = {1, -1, 0, 0};
using namespace std;
long long int mark[32000];
vector<long long int> v;
void seive() {
  long long int i, j;
  for (i = 3; i < 32000; i += 2) {
    if (mark[i] == 0) {
      for (j = i + i; j < 32000; j += i) mark[j] = 1;
    }
  }
  v.push_back(2);
  for (i = 3; i < 32000; i += 2)
    if (mark[i] == 0) v.push_back(i);
}
vector<pair<long long int, long long int> > factor(long long int n) {
  long long int i;
  vector<pair<long long int, long long int> > v1;
  for (i = 0; i < v.size() && v[i] <= sqrt(n); i++) {
    long long int cn = 0;
    while (n % v[i] == 0) {
      n /= v[i];
      cn++;
    }
    if (cn > 0) v1.push_back(make_pair(v[i], cn));
  }
  if (n != 1) v1.push_back(make_pair(n, 1));
  return v1;
}
long long int a[100005], b[50][100005], b1[50][100005];
void cal(vector<pair<long long int, long long int> > v, long long int n) {
  long long int i, j;
  for (i = 0; i < v.size(); i++) {
    long long int p = v[i].first;
    for (j = 1; j <= n; j++) {
      while (a[j] % p == 0) {
        a[j] /= p;
        b[i][j]++;
      }
      b[i][j] += b[i][j - 1];
    }
  }
  for (i = 0; i < v.size(); i++) {
    for (j = 1; j <= n; j++) {
      long long int lo = j, hi = n, mid, ans = -1;
      while (lo <= hi) {
        mid = (lo + hi) >> 1;
        long long int p = b[i][mid] - b[i][j - 1];
        if (p < v[i].second)
          lo = mid + 1;
        else {
          ans = mid;
          hi = mid - 1;
        }
      }
      b1[i][j] = ans;
    }
  }
}
int main() {
  long long int n, k, i, j;
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  seive();
  while (cin >> n >> k) {
    for (long long int i = 1; i < n + 1; i++) cin >> a[i];
    if (k == 1) {
      cout << (n * (n + 1)) / 2 << endl;
      continue;
    }
    vector<pair<long long int, long long int> > v = factor(k);
    cal(v, n);
    long long int ans = 0;
    for (i = 1; i <= n; i++) {
      long long int max1 = 0;
      bool f = 0;
      for (j = 0; j < v.size(); j++) {
        if (b1[j][i] == -1) f = 1;
        max1 = max(max1, b1[j][i]);
      }
      if (f == 1) break;
      ans += (n - max1 + 1);
    }
    cout << ans << endl;
  }
  return 0;
}
