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. 
import java.util.*;
import java.io.*;

public class Main {
	public static void main(String args[]) {new Main().run();}

	FastReader in = new FastReader();
	PrintWriter out = new PrintWriter(System.out);
	void run(){
		work();
		out.flush();
	}
	long mod=998244353;
	long gcd(long a,long b) {
		return b==0?a:gcd(b,a%b);
	}
	//https://codeforces.com/problemset/problem/818/E
	void work() {
		int n=in.nextInt();
		long k=in.nextLong();
		if(k==1) {
			out.println((long)(1+n)*n/2);
			return;
		}
		HashMap<Long,Integer> map=new HashMap<>();
		HashMap<Long,TreeMap<Integer,Integer>> trees=new HashMap<>();//cnt,index
		long[] A=new long[n];
		for(int i=0;i<n;i++)A[i]=in.nextLong();
		for(long i=2;i*i<=k;i++) {
			if(k%i==0) {
				trees.put(i,new TreeMap<>());
				trees.get(i).put(0,-1);
				while(k%i==0) {
					map.put(i,map.getOrDefault(i, 0)+1);
					k/=i;
				}
			}
		}
		if(k!=1) {
			map.put(k,map.getOrDefault(k, 0)+1);
			trees.put(k,new TreeMap<>());
			trees.get(k).put(0,-1);
		}
		long ret=0;
		HashMap<Long,Integer> count=new HashMap<>();
		for(long key:map.keySet()) {
			count.put(key,0);
		}
		out:
		for(int i=0;i<n;i++) {
			long num=A[i];
			for(long key:trees.keySet()) {
				TreeMap<Integer,Integer> tree=trees.get(key);
				int cur=count.get(key);
				while(num%key==0) {
					num/=key;
					cur++;
				}
				count.put(key,cur);
				tree.put(cur,i);
			}
			long min=999999999;
			for(long key:trees.keySet()) {
				TreeMap<Integer,Integer> tree=trees.get(key);
				int cur=count.get(key);
				int pre=cur-map.get(key);
				Integer p=tree.floorKey(pre);
				if(p==null)continue out;
				int idx=tree.get(p);
				min=Math.min(min, idx+2);
			}
			ret+=min;
		}
		out.println(ret);
	}
	private int query(Node node,int index, int l, int r) {
		if(l==r) {
			return l;
		}
		int m=(l+r)/2;
		int ret=0;
		Node lnode=getLnode(node);
		Node rnode=getRnode(node);
		if(index<=lnode.cnt) {
			ret=query(lnode,index,l,m);
		}else {
			ret=query(rnode,index-lnode.cnt,m+1,r);
		}
		node.cnt=lnode.cnt+rnode.cnt;
		return ret;
	}
	
	void insert(Node node,int index,int l,int r) {
		if(l==r) {
			node.cnt++;
			return;
		}
		int m=(l+r)/2;
		Node lnode=getLnode(node);
		Node rnode=getRnode(node);
		if(index<=m) {
			insert(lnode,index,l,m);
		}else {
			insert(rnode,index,m+1,r);
		}
		node.cnt=lnode.cnt+rnode.cnt;
	}
	private Node getRnode(Node node) {
		if(node.rnode==null)node.rnode=new Node();
		return node.rnode;
	}
	private Node getLnode(Node node) {
		if(node.lnode==null)node.lnode=new Node();
		return node.lnode;
	}
	
	class Node{
		Node lnode,rnode;
		int cnt;
	}
}	



class FastReader
{
	BufferedReader br;
	StringTokenizer st;

	public FastReader()
	{
		br=new BufferedReader(new InputStreamReader(System.in));
	}

	public String next() 
	{
		if(st==null || !st.hasMoreElements())
		{
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return st.nextToken();
	}

	public int nextInt() 
	{
		return Integer.parseInt(next());
	}

	public long nextLong()
	{
		return Long.parseLong(next());
	}
}