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.awt.Checkbox;
	import java.awt.Point;
	import java.io.*;
	        		    import java.math.*;
	        		    import java.util.*;
	        		    import javax.print.attribute.SetOfIntegerSyntax;
	     
	     
	     
	        		    public class LIS{
	        		    	private static InputStream stream;
	        		    	private static byte[] buf = new byte[1024];
	        		    	private static int curChar;
	        		    	private static int numChars;
	        		    	private static SpaceCharFilter filter;
	        		    	private static PrintWriter pw;
	        		    	private static long count = 0,mod=(long)1e9 + 7;
	        		    //	private static TreeSet<Integer> ts=new TreeSet[200000];
	 
	    		        public static void main(String[] args) {
	    		        	InputReader(System.in);
	    		    		pw = new PrintWriter(System.out); 
	    		            new Thread(null ,new Runnable(){
	    		               public void run(){
	    		                   try{
	    		                       solve();
	    		                       pw.close();
	    		                   } catch(Exception e){
	    		                       e.printStackTrace();
	    		                   }
	    		               }
	    		           },"1",1<<26).start();
	   }
	    public static void Merge(long a[],int p,int r){
	        if(p<r){
	            int q = (p+r)/2;
	            Merge(a,p,q);
	            Merge(a,q+1,r);
	            Merge_Array(a,p,q,r);
	        }
	    }
	    public static void Merge_Array(long a[],int p,int q,int r){
	       long b[] = new long[q-p+1];
	        long c[] = new long[r-q];
	        for(int i=0;i<b.length;i++)
	            b[i] = a[p+i];
	        for(int i=0;i<c.length;i++)
	            c[i] = a[q+i+1];
	        int i = 0,j = 0;
	        for(int k=p;k<=r;k++){
	            if(i==b.length){
	                a[k] = c[j];
	                j++;
	            }
	            else if(j==c.length){
	                a[k] = b[i];
	                i++;
	            }
	            else if(b[i]<c[j]){
	                a[k] = b[i];
	                i++;
	            }
	            else{
	                a[k] = c[j];
	                j++;
	            }
	        }
	    }
		public static long gcd(long x, long y) {
			if (x == 0)
				return y;
			else
				return gcd( y % x,x);
		}	public static boolean isPrime(int n) {
		// Corner cases
			if (n <= 1)
				return false;
			if (n <= 3)
				return true;
	 
			// This is checked so that we can skip 
	// middle five numbers in below loop
			if (n % 2 == 0 || n % 3 == 0)
				return false;
	 
			for (int i = 5; i * i <= n; i = i + 6)
				if (n % i == 0 || n % (i + 2) == 0)
					return false;
	 
			return true;
		}
		public static void test(){
			int t=nextInt();
			while(t-->0){
				solve();
			}
		}
		static int x, y;
		static TreeSet<Integer> hs=new TreeSet<Integer>();
		static ArrayList<Pair> ar;
		static int pre[][];
		public static void solve() {
	  
			int n=nextInt();
			int k=nextInt();
			int a[]=nextIntArray(n);
			ar=new ArrayList<Pair>();
			int cnt=0;
			while(k%2==0){
				k/=2;
				cnt++;
			}
			if(cnt>0){
				ar.add(new Pair(2, cnt));
			}
			for(int i=3;i<=Math.sqrt(k);i++){
				cnt=0;
				while(k%i==0){
					k/=i;
					cnt++;
				}
				if(cnt>0){
					ar.add(new Pair(i, cnt));
				}
			}
			if(k>1)ar.add(new Pair(k, 1));
			
			
			pre=new int[n+1][ar.size()];
			for(int i=0;i<ar.size();i++){
				
				for(int j=0;j<n;j++){
					cnt=0;
					while(a[j]%ar.get(i).prime==0){
						a[j]/=ar.get(i).prime;
					cnt++;
					}
					pre[j+1][i]+=cnt;
					
					pre[j+1][i]+=pre[j][i];
				}
				
			}
			long f_ans=0;
			for(int i=1;i<=n;i++){
				
				int low=i,high=n,ans=-1;
				while(low<=high){
					int mid=(low+high)/2;
					if(check(i,mid)){
						ans=mid;high=mid-1;
					}else{
						low=mid+1;
					}
				}
				if(ans!=-1)
				f_ans+=(n-ans+1);
			}
			pw.println(f_ans);
		}
		private static boolean check(int start,int mid){
			for(int i=0;i<ar.size();i++){
				if(pre[mid][i]-pre[start-1][i] < ar.get(i).freq){
					return false;
				}
			}
			return true;
		}
		
	          public static long pow(long n, long p,long mod) {
				if(p==0)
					return 1;
				if(p==1)
					return n%mod;
				if(p%2==0){
					long temp=pow(n, p/2,mod);
				return (temp*temp)%mod;
				}else{
					 	long temp=pow(n,p/2,mod);
					 	temp=(temp*temp)%mod;
					 	return(temp*n)%mod;
					 	
				}
			}
	    
			        
			        
	        public static int LCS(String a,String b){
	        	int dp[][]=new int [a.length()+1][b.length()+1];
	        	for(int i=0;i<a.length();i++){
	        		for(int j=0;j<b.length();j++){
	        			if(a.charAt(i)==b.charAt(j)){
	        				dp[i+1][j+1]=1+dp[i][j];
	        			}else{
	        				dp[i+1][j+1]=Math.max(dp[i][j+1], dp[i+1][j]);
	        			}
	        		}
	        	}
	        	return dp[a.length()][b.length()];
	        }
	      
	        public static String reverseString(String s) {
				StringBuilder sb = new StringBuilder(s);
				sb.reverse();
				return (sb.toString());
			}
	  
	    		       
	// To Get Input
	// Some Buffer Methods
	 
	    		     	public static void sort(long a[]){
	    		     		Merge(a, 0, a.length-1);
	    		     	}
	    		    	public static void InputReader(InputStream stream1) {
	    		    		stream = stream1;
	    		    	}
	 
	    		    	private static boolean isWhitespace(int c) {
	    		    		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	    		    	}
	 
	    		    	private static boolean isEndOfLine(int c) {
	    		    		return c == '\n' || c == '\r' || c == -1;
	    		    	}
	 
	    		    	private static int read() {
	    		    		if (numChars == -1)
	    		    			throw new InputMismatchException();
	    		    		if (curChar >= numChars) {
	    		    			curChar = 0;
	    		    			try {
	    		    				numChars = stream.read(buf);
	    		    			} catch (IOException e) {
	    		    				throw new InputMismatchException();
	    		    			}
	    		    			if (numChars <= 0)
	    		    				return -1;
	    		    		}
	    		    		return buf[curChar++];
	    		    	}
	 
	    		    	private static int nextInt() {
	    		    		int c = read();
	    		    		while (isSpaceChar(c))
	    		    			c = read();
	    		    		int sgn = 1;
	    		    		if (c == '-') {
		sgn = -1;
		c = read();
	}
	int res = 0;
	do {
		if (c < '0' || c > '9')
		throw new InputMismatchException();
	res *= 10;
	res += c - '0';
	    		    			c = read();
	    		    		} while (!isSpaceChar(c));
	    		    		return res * sgn;
	    		    	}
	 
	    		    	private static long nextLong() {
	    		    		int c = read();
	    		    		while (isSpaceChar(c))
	    		    			c = read();
	    		    		int sgn = 1;
	    		    		if (c == '-') {
		sgn = -1;
		c = read();
	}
	long res = 0;
	do {
		if (c < '0' || c > '9')
		throw new InputMismatchException();
	res *= 10;
	res += c - '0';
	    		    			c = read();
	    		    		} while (!isSpaceChar(c));
	    		    		return res * sgn;
	    		    	}
	 
	    		    	private static String nextToken() {
	    		    		int c = read();
	    		    		while (isSpaceChar(c))
	    		    			c = read();
	    		    		StringBuilder res = new StringBuilder();
	    		    		do {
	    		    			res.appendCodePoint(c);
	    		    			c = read();
	    		    		} while (!isSpaceChar(c));
	    		    		return res.toString();
	    		    	}
	 
	    		    	private static String nextLine() {
	    		    		int c = read();
	    		    		while (isSpaceChar(c))
	    		    			c = read();
	    		    		StringBuilder res = new StringBuilder();
	    		    		do {
	    		    			res.appendCodePoint(c);
	    		    			c = read();
	    		    		} while (!isEndOfLine(c));
	    		    		return res.toString();
	    		    	}
	 
	    		    	private static int[] nextIntArray(int n) {
	    		    		int[] arr = new int[n];
	    		    		for (int i = 0; i < n; i++) {
	    		    			arr[i] = nextInt();
	    		    		}
	    		    		return arr;
	    		    	}
	 
	    		    	private static long[][] next2dArray(int n, int m) {
	    		    		long[][] arr = new long[n][m];
	    		    		for (int i = 0; i < n; i++) {
	    		    			for (int j = 0; j < m; j++) {
	    		    				arr[i][j] = nextLong();
	    		    			}
	    		    		}
	    		    		return arr;
	    		    	}
	    		    	private static char[][] nextCharArray(int n,int m){
	    		    		char [][]c=new char[n][m];
	    		    		for(int i=0;i<n;i++){
	    		    			String s=nextLine();
	    		    			for(int j=0;j<s.length();j++){
	    		    				c[i][j]=s.charAt(j);
	    		    			}
	    		    		}
	    		    		return c;
	    		    	}
	 
	    		    	private static long[] nextLongArray(int n) {
	    		    		long[] arr = new long[n];
	    		    		for (int i = 0; i < n; i++) {
	    		    			arr[i] = nextLong();
	    		    		}
	    		    		return arr;
	    		    	}
	 
	    		    	private static void pArray(int[] arr) {
	    		    		for (int i = 0; i < arr.length; i++) {
	    		    			pw.print(arr[i] + " ");
	    		    		}
	    		    		pw.println();
	    		    		return;
	    		    	}
	 
	    		    	private static void pArray(long[] arr) {
	    		    		for (int i = 0; i < arr.length; i++) {
	    		    			pw.print(arr[i] + " ");
	    		    		}
	    		    		pw.println();
	    		    		return;
	    		    	}
	 
	    		    	private static void pArray(boolean[] arr) {
	    		    		for (int i = 0; i < arr.length; i++) {
	    		    			pw.print(arr[i] + " ");
	    		    		}
	    		    		pw.println();
	    		    		return;
	    		    	}
	 
	    		    	private static boolean isSpaceChar(int c) {
	    		    		if (filter != null)
	    		    			return filter.isSpaceChar(c);
	    		    		return isWhitespace(c);
	    		    	}
	 
	    		    	private interface SpaceCharFilter {
	    		    		public boolean isSpaceChar(int ch);
	    		    	}
	        		    }
	    		    	 class Pair implements Comparable<Pair>{
		        				
		    					
		    					int prime,freq;
		    					Pair(int prime,int freq){
		    					
		    						this.prime=prime;
		    						this.freq=freq;
		    					
		    					}
		    					@Override
		    					public int compareTo(Pair o) {
		    				
		    							
		    					
		    						/*if(start!=o.start)
		    						return (start-o.start);
		    						else
		    							return end-o.end;
		    						*/return 0;
		    					}
		    					public int hashCode() {
		    							//int hu = (int) (x ^ (x >>> 32));
		    							//int hv = (int) (y ^ (y >>> 32));
		    							//int hw = (int) (mass ^ (mass >>> 32));
		    							//return 31 * hu + hv ;
		    						return 0;
		    						}
		    						public boolean equals(Object o) {
		    							Pair other = (Pair) o;
		    						//	return x == other.x && y == other.y;
		    						return false;
		    						}
		    				}
	 
	
	    		    	 class Hashing {
							 
							  static final int multiplier = 43;
							  static final Random rnd = new Random();
							  static final int mod1 = BigInteger.valueOf((int) (1e9 + rnd.nextInt((int) 1e9))).nextProbablePrime().intValue();
							  static final int mod2 = BigInteger.valueOf((int) (1e9 + rnd.nextInt((int) 1e9))).nextProbablePrime().intValue();
							  static final int invMultiplier1 = BigInteger.valueOf(multiplier).modInverse(BigInteger.valueOf(mod1)).intValue();
							  static final int invMultiplier2 = BigInteger.valueOf(multiplier).modInverse(BigInteger.valueOf(mod2)).intValue();
					 
							  long[] hash1, hash2;
							  long[] inv1, inv2;
							  int n;
					 
							  public Hashing(String s) {
							    n = s.length();
							    hash1 = new long[n + 1];
							    hash2 = new long[n + 1];
							    inv1 = new long[n + 1];
							    inv2 = new long[n + 1];
							    inv1[0] = 1;
							    inv2[0] = 1;
					 
							    long p1 = 1;
							    long p2 = 1;
							    for (int i = 0; i < n; i++) {
							      hash1[i + 1] = (hash1[i] + s.charAt(i) * p1) % mod1;
							      p1 = p1 * multiplier % mod1;
							      inv1[i + 1] = inv1[i] * invMultiplier1 % mod1;
							      hash2[i + 1] = (hash2[i] + s.charAt(i) * p2) % mod2;
							      p2 = p2 * multiplier % mod2;
							      inv2[i + 1] = inv2[i] * invMultiplier2 % mod2;
							    }
							  }
					 
							  public long getHash(int i, int r) {
								//  i--;
							    return (((hash1[r] - hash1[i] + mod1) * inv1[i] % mod1) << 32)
							        + (hash2[r] - hash2[i] + mod2) * inv2[i] % mod2;
							  }
						}
