#include<bits/stdc++.h>
using namespace std;
long long n,m,ans=1;
int main(){
	freopen("employ.in","r",stdin); 
	freopen("employ.out","w",stdout);
	cin>>n>>m;
	for(int i=1;i<=m;i++){
		ans=ans*i%998244353;
	}
	cout<<ans%998244353;
	return 0;
}

