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;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
inline long long MAX2(long long a, long long b) {
  return (a) > (b) ? (a) : (b);
}
inline long long MAX3(long long a, long long b, long long c) {
  return (a) > (b) ? ((a) > (c) ? (a) : (c)) : ((b) > (c) ? (b) : (c));
}
inline long long MIN2(long long a, long long b) {
  return (a) < (b) ? (a) : (b);
}
inline long long MIN3(long long a, long long b, long long c) {
  return (a) < (b) ? ((a) < (c) ? (a) : (c)) : ((b) < (c) ? (b) : (c));
}
int mod = 1e9 + 7;
int64_t extGcd(int64_t a, int64_t b, int64_t &x, int64_t &y) {
  if (!a) {
    x = 0;
    y = 1;
    return b;
  }
  int64_t x1, y1;
  int64_t d = extGcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
inline long long addmod(long long a, long long b) {
  a = a % mod + b % mod;
  if (a > mod) a %= mod;
  return a;
}
inline long long submod(long long a, long long b) {
  a = a % mod - b % mod;
  if (a < 0) a += mod;
  return a;
}
inline long long mulmod(long long a, long long b) {
  return (a % mod * b % mod) % mod;
}
int dx[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
int DX[] = {2, 1, -1, -2, -2, -1, 1, 2};
int DY[] = {1, 2, 2, 1, -1, -2, -2, -1};
inline long long exp(long long a, long long b) {
  if (a == 0) return 0ll;
  long long r = 1LL;
  while (b > 0) {
    if (b & 1) {
      r = r * (a % mod);
      r = (r + mod) % mod;
    }
    b /= 2;
    a = (a % mod) * (a % mod);
    a = (a + mod) % mod;
  }
  return (r + mod) % mod;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  if (a == 0) return b;
  return gcd(b, a % b);
}
unsigned long int setbits(long long n) {
  unsigned long int count = 0;
  while (n) {
    n &= (n - 1);
    count++;
  }
  return count;
}
int main() {
  if (fopen("input.txt", "r"))
    freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  ;
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, k;
  cin >> n >> k;
  long long a[n];
  for (long long i = (long long)(0); i < (long long)(n); i++) cin >> a[i];
  int p1;
  int p2;
  p1 = 0;
  p2 = 0;
  long long K = k;
  vector<int> target;
  map<long long, int> m1;
  for (int i = 2; i * i <= K; i++) {
    if (K % i == 0) {
      int cc = 0;
      while (K % i == 0) {
        cc++;
        K = K / i;
      }
      m1[i] = cc;
      target.push_back(i);
    }
  }
  long long ans = 0;
  if (K > 1) {
    m1[K] = 1;
    target.push_back((int)K);
  }
  map<long long, int> pres;
  int i = 0;
  for (i = 0; i < n; i++) {
    bool flag = false;
    long long num = 1;
    while (!flag and p2 < n) {
      num = a[p2];
      for (int p : target) {
        int cc = 0;
        while (num % p == 0) {
          cc++;
          num = num / p;
        }
        pres[p] += cc;
      }
      flag = true;
      for (auto x : target) {
        if (pres[x] < m1[x]) flag = false;
      }
      p2++;
    }
    if (flag) {
      while (i < p2 and flag) {
        ans += (n - (p2 - 1));
        num = a[i];
        for (int p : target) {
          int cc = 0;
          while (num % p == 0) {
            cc++;
            num = num / p;
          }
          pres[p] -= cc;
        }
        for (auto p : target)
          if (pres[p] < m1[p]) flag = false;
        i++;
      }
      i--;
    }
  }
  cout << ans << '\n';
}
