#include<bits/stdc++.h>
#define pq priority_queue
using namespace std;
const int N=1e4+5;
const int mod=998244353;
int n,w,ccf,ans=1;
int a[N],cnt[N];
pq<int,vector<int>,greater<int> >q;
int read() {
int x = 0, y = 1;
char ch = 0;
while (ch < '0' || ch > '9') {
if (ch == '-') y = -1;
ch = getchar();
}
while(ch>='0' && ch<='9'){
x=x*10+(ch-'0');
ch=getchar();
}
return x*y;
}
void solve(int x,int sum) {
for(int i=1; i<=n; i++) {
cnt[i]=1;
while(a[i]%x==0) cnt[i]++,a[i]/=x;
q.push(cnt[i]);
}
while(sum) {
int x=q.top();
q.pop();
q.push(x+1),sum--;
}
for(int i=1; i<=n; i++) ans=ans*q.top()%mod,q.pop();
}
int main() {
n=read();
w=read();
for(int i=1; i<=n; i++) {
a[i]=read();
}
for(int i=2; i*i<=w; i++) {
if(w%i==0) {
ccf=0;
while(w%i==0)ccf++,w/=i;
solve(i,ccf);
}
}
if(w>1)solve(w,1);
for(int i=1; i<=n; i++){
for(int j=2;j*j<=a[i];j++) {
ccf=1;
while(a[i]%j==0)a[i]/=j,ccf++;
ans=ans*ccf%mod;
}
if(a[i]>1)ans=ans*2%mod;
}
printf("%lld",ans);
return 0;
}