// Slower C++ solution:
#include <iostream>

#include <sstream>

#include <algorithm>

#include <cstdio>

#include <cmath>

#include <set>

#include <map>

#include <queue>

#include <string>

#include <cstring>

#include <bitset>

#include <functional>

#include <random>

#define REP(i,a,n) for(int i=a;i<=n;++i)

#define PER(i,a,n) for(int i=n;i>=a;--i)

#define hr putchar(10)

#define pb push_back

#define lc (o<<1)

#define rc (lc|1)

#define mid ((l+r)>>1)

#define ls lc,l,mid

#define rs rc,mid+1,r

#define x first

#define y second

#define io std::ios::sync_with_stdio(false)

#define endl '\n'

#define DB(a) ({REP(__i,1,n) cout<<a[__i]<<',';hr;})

using namespace std;

typedef long long ll;

const int N = 1e4+10, P = 924844033, G = 5, Gi = 554906420;

ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}

ll qpow(ll a,ll n) {ll r=1%P;for (a%=P;n;a=a*a%P,n>>=1)if(n&1)r=r*a%P;return r;}

ll inv(ll x){return x<=1?1:inv(P%x)*(P-P/x)%P;}



int lim,l,A[N],B[N],R[N];

void init(int n) {

    for (lim=1,l=0; lim<=n; lim<<=1,++l) ;

    REP(i,0,lim-1) R[i]=(R[i>>1]>>1)|((i&1)<<(l-1));

}



void NTT(int *J, int tp=1) {

    REP(i,0,lim-1) if (i<R[i]) swap(J[i],J[R[i]]);

    for (int j=1; j<lim; j<<=1) {

        ll T = qpow(tp==1?G:Gi,(P-1)/(j<<1));

        for (int k=0; k<lim; k+=j<<1) {

            ll t = 1;

            for (int l=0; l<j; ++l,t=t*T%P) {

                int y = t*J[k+j+l]%P;

                J[k+j+l] = (J[k+l]-y)%P;

                J[k+l] = (J[k+l]+y)%P;

            }

        }

    }

    if (tp==-1) {

        ll inv = qpow(lim, P-2);

        REP(i,0,lim-1) J[i]=(ll)inv*J[i]%P;

    }

}



int n,k,fac[N],ifac[N],a[N],b[N];

int C(int n, int m) {

	if (m>n) return 0;

	return (ll)fac[n]*ifac[m]%P*ifac[n-m]%P;

}



int main() {

	fac[0] = 1;

	REP(i,1,N-1) fac[i] = (ll)fac[i-1]*i%P;

	ifac[N-1] = inv(fac[N-1]);

	PER(i,0,N-2) ifac[i]=(ll)ifac[i+1]*(i+1)%P;

	scanf("%d%d", &n, &k);

	REP(i,0,n) a[i]=C(n/k-i,i),b[i]=C(n/k+1-i,i);

	init(2*n+2);

	NTT(a),NTT(b);

	REP(i,0,lim-1) a[i]=qpow(a[i],(k-n%k)*2)*qpow(b[i],n%k*2)%P;

	NTT(a,-1);

	int ans = 0;

	REP(i,0,n) {

		if (i&1) ans=(ans-(ll)a[i]*fac[n-i])%P;

		else ans=(ans+(ll)a[i]*fac[n-i])%P;

	}

	if (ans<0) ans += P;

	printf("%d\n", ans);

}














// Faster C++ solution for the same problem (measured speedup: 0.5504930748075222x):
#include<bits/stdc++.h>

using namespace std;

typedef long long LL;



const int N=2100,mod=924844033;

int n,K,cnt[N];

LL fac[N<<1],inv[N<<1],f[2][N],Ans;



LL qpow(LL x,int y)

{

	LL ret=1;

	while(y)

	{

		if(y&1) ret=ret*x%mod;

		x=x*x%mod, y>>=1;

	}

	return ret;

}



LL C(int x,int y)

{

	if(y>x) return 0;

	return fac[x]*inv[y]%mod*inv[x-y]%mod;

}



int main()

{

	scanf("%d%d",&n,&K);

	fac[0]=1;

	for(int i=1;i<=n<<1;++i) fac[i]=fac[i-1]*i%mod;

	inv[n<<1]=qpow(fac[n<<1],mod-2);

	for(int i=(n<<1)-1;i>=0;--i) inv[i]=inv[i+1]*(i+1)%mod;

	if(K*2>=n)

	{

		Ans=fac[n];

		for(int i=1;i<=(n-K)*2;++i)

			if(i&1) (Ans-=fac[n-i]*C((n-K)*2,i))%=mod;

			else (Ans+=fac[n-i]*C((n-K)*2,i))%=mod;

		(Ans+=mod)%=mod;

		printf("%lld",Ans); return 0;

	}

	for(int i=1;i<=K;++i) cnt[i]=(n-i-K)/(2*K)+1 + (n-i)/(2*K);

	f[0][0]=1;

	for(int i=1;i<=K;++i)

	{

		for(int j=0;j<=n;++j) f[1][j]=f[0][j];

		for(int j=0;j<=n;++j)

			for(int k=1;k<=min(j,cnt[i]);++k)

				(f[1][j]+=f[0][j-k]*C(cnt[i]-k+1,k)%mod)%=mod;

		for(int j=0;j<=n;++j) f[0][j]=f[1][j];

		for(int j=0;j<=n;++j)

			for(int k=1;k<=min(j,cnt[i]);++k)

				(f[0][j]+=f[1][j-k]*C(cnt[i]-k+1,k)%mod)%=mod;

	}

	Ans=fac[n];

	for(int i=1;i<=n;++i)

		if(i&1) (Ans-=f[0][i]*fac[n-i]%mod)%=mod;

		else (Ans+=f[0][i]*fac[n-i]%mod)%=mod;

	Ans=(Ans+mod)%mod;

	printf("%lld",Ans);

	return 0;

}