# 代码

#include <bits/stdc++.h>
#define clr(x) memset(x,0,sizeof x)
#define For(i,a,b) for (int i=(a);i<=(b);i++)
#define Fod(i,b,a) for (int i=(b);i>=(a);i--)
#define fi first
#define se second
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define outval(x) cerr<<#x" = "<<x<<endl
#define outtag(x) cerr<<"---------------"#x"---------------"<<endl
#define outarr(a,L,R) cerr<<#a"["<<L<<".."<<R<<"] = ";\
For(_x,L,R)cerr<<a[_x]<<" ";cerr<<endl;
using namespace std;
typedef long long LL;
typedef vector <int> vi;
LL x=0,f=0;
char ch=getchar();
while (!isdigit(ch))
f|=ch=='-',ch=getchar();
while (isdigit(ch))
x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
return f?-x:x;
}
const int N=1<<19,mod=998244353;
int Pow(int x,int y){
int ans=1;
for (;y;y>>=1,x=(LL)x*x%mod)
if (y&1)
ans=(LL)ans*x%mod;
return ans;
}
if ((x+=y)>=mod)
x-=mod;
}
void Del(int &x,int y){
if ((x-=y)<0)
x+=mod;
}
return x>=mod?x-mod:x;
}
int Del(int x){
return x<0?x+mod:x;
}
namespace fft{
int w[N],R[N];
void init(int n){
int d=0;
while ((1<<d)<n)
d++;
For(i,0,n-1)
R[i]=(R[i>>1]>>1)|((i&1)<<(d-1));
w[0]=1,w[1]=Pow(3,(mod-1)/n);
For(i,2,n-1)
w[i]=(LL)w[i-1]*w[1]%mod;
}
void FFT(int *a,int n,int flag){
if (flag<0)
reverse(w+1,w+n);
For(i,0,n-1)
if (i<R[i])
swap(a[i],a[R[i]]);
for (int t=n>>1,d=1;d<n;d<<=1,t>>=1)
for (int i=0;i<n;i+=d<<1)
for (int j=0;j<d;j++){
int tmp=(LL)w[t*j]*a[i+j+d]%mod;
a[i+j+d]=Del(a[i+j]-tmp);
}
if (flag<0){
reverse(w+1,w+n);
int inv=Pow(n,mod-2);
For(i,0,n-1)
a[i]=(LL)a[i]*inv%mod;
}
}
}
using fft::FFT;
int n,m;
vi a[N],p[N];
vi operator * (vi A,vi B){
static int a[N],b[N];
int n=1;
while (n<A.size()+B.size())
n<<=1;
For(i,0,n-1)
a[i]=b[i]=0;
For(i,0,(int)A.size()-1)
a[i]=A[i];
For(i,0,(int)B.size()-1)
b[i]=B[i];
fft::init(n);
FFT(a,n,1),FFT(b,n,1);
For(i,0,n-1)
a[i]=(LL)a[i]*b[i]%mod;
FFT(a,n,-1);
vi ans;
For(i,0,n-1)
ans.pb(a[i]);
while (ans.size()>1&&!ans.back())
ans.pop_back();
return ans;
}
vi build(int *a,int L,int R){
if (L==R)
return (vi){Del(1-a[L]),a[L]};
int mid=(L+R)>>1;
vi lp=build(a,L,mid);
vi rp=build(a,mid+1,R);
return lp*rp;
}
void Getp(int x){
int s=a[x].size();
if (!s)
p[x]=(vi){1};
else
p[x]=build(&a[x][0],0,s-1);
}
int main(){
For(i,1,m){
x=(LL)x*Pow(y,mod-2)%mod;
a[p].pb(x);
}
int ans=0;
For(i,0,n){
Getp(i);
if (i>0)
p[i]=p[i]*p[i-1];
For(j,0,(int)p[i].size()-1)