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;
const long long max1 = 11;
const long long max2 = 102;
const long long max3 = 1003;
const long long max4 = 10004;
const long long maxx = 100005;
const long long max6 = 1000006;
const long long max7 = 10000007;
const long long lg2 = 7;
const long long lg3 = 10;
const long long lg4 = 13;
const long long lg5 = 17;
const long long lg6 = 20;
const long long lg7 = 24;
const long long lg8 = 27;
const long long lg9 = 30;
const long long lg18 = 60;
const long long INF = 2LL * 1000000000;
long long powmod(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long is_prime(long long n) {
  if (n == 1) return 0;
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (long long i = 3; i <= sqrt(n); i += 2)
    if (n % i == 0) return 0;
  return 1;
}
long long is_integer(double n) {
  if (floor(n) == ceil(n)) return 1;
  return 0;
}
long long sto_int(string s) {
  stringstream ss(s);
  long long n;
  ss >> n;
  return n;
}
string to_string(long long n) {
  stringstream ss;
  ss << n;
  string s = ss.str();
  return s;
}
long long n, k;
long long arr[maxx];
vector<pair<long long, long long> > v;
long long cnt[20];
long long divisible() {
  for (long long i = 0; i < v.size(); i++) {
    if (cnt[i] < v[i].second) return 0;
  }
  return 1;
}
void add_num(long long num) {
  for (long long i = 0; i < v.size(); i++) {
    if (num % v[i].first == 0) {
      while (num % v[i].first == 0) {
        num /= v[i].first;
        cnt[i]++;
      }
    }
  }
}
void del_num(long long num) {
  for (long long i = 0; i < v.size(); i++) {
    if (num % v[i].first == 0) {
      while (num % v[i].first == 0) {
        num /= v[i].first;
        cnt[i]--;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  ;
  cin >> n >> k;
  if (k == 1) {
    cout << n * (n + 1) / 2LL << endl;
    return 0;
  }
  for (long long i = 2; i * i <= k; i++) {
    if (k % i == 0) {
      v.push_back({i, 0});
      while (k % i == 0) {
        k /= i;
        v[v.size() - 1].second++;
      }
    }
  }
  if (k > 1) {
    v.push_back({k, 1});
  }
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  long long l = 1, r = 1;
  long long x = 1;
  long long ans = 0;
  while (l <= n && r <= n) {
    while (!divisible() && r <= n) {
      add_num(arr[r]);
      r++;
    }
    if (!divisible()) break;
    while (divisible()) {
      del_num(arr[l]);
      l++;
    }
    ans = ans + 1LL * (l - x) * (n - r + 2);
    x = l;
  }
  cout << ans << endl;
  return 0;
}
