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>
using namespace std;
long long spf[2];
long long fac[2];
void sieve() {
  spf[1] = 1;
  for (long long i = 2; i < 2; i++) spf[i] = i;
  for (long long i = 4; i < 2; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < 2; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j < 2; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
map<long long, long long> getfactor(long long a) {
  map<long long, long long> m;
  while (a > 1) {
    m[spf[a]]++;
    a /= spf[a];
  }
  return m;
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long inverse(long long a, long long p) { return power(a, p - 2, p); }
long long ncr(long long n, long long r, long long p) {
  if (r == 0) return 1;
  return (fac[n] * inverse(fac[r], p) % p * inverse(fac[n - r], p) % p) % p;
}
long long seg[400001];
long long k;
void build(long long a[], long long v, long long l, long long r) {
  if (l == r) {
    seg[v] = a[l];
    return;
  }
  long long mid = (l + r) / 2;
  build(a, v * 2, l, mid);
  build(a, v * 2 + 1, mid + 1, r);
  seg[v] = gcd(k, seg[v * 2] * seg[v * 2 + 1]);
}
long long query(long long v, long long l, long long r, long long posl,
                long long posr) {
  if (l >= posl && r <= posr)
    return seg[v];
  else if (l > posr || r < posl)
    return 1;
  long long mid = (l + r) / 2;
  return gcd(k, (query(v * 2, l, mid, posl, posr) *
                 query(v * 2 + 1, mid + 1, r, posl, posr)));
}
void solve() {
  long long n;
  cin >> n >> k;
  long long a[n + 1];
  for (long long i = 1; i <= n; i++) cin >> a[i];
  build(a, 1, 1, n);
  long long r = 1;
  long long ans = 0;
  for (long long i = 1; i <= n; i++) {
    if (r < i)
      while (r < i) r++;
    while (query(1, 1, n, i, r) % k > 0 && r <= n) r++;
    if (r <= n) ans += (n - r) + 1;
  }
  cout << ans << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
}
