// 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: 1.9332405316061627x):
#include<cstdio>

#define N 2002

#define p 924844033

inline int mod(int x){return x<p?x:x-p;}

int a[N],f[N][2],i,j,m,n,s,x;

int main()

{

	scanf("%d%d",&n,&m),f[0][0]=1;

	for(i=1;i<=m;i++)

	{

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

		for(s=(n-i)/m+2>>1;s--;)

		for(j=n;j--;)

		{

			f[j+1][0]=mod(f[j+1][0]+f[j][0]);

			f[j+1][1]=mod(f[j+1][1]+mod(f[j][0]+f[j][1]));

			f[j][0]=mod(f[j][0]+f[j][1]);

			f[j][1]=0;

		}

		if(~((n-i)/m)&1)for(j=0;j<=n;j++)f[j][1]=0;

	}

	for(;i<=n&&i<=m<<1;i++)

	{

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

		for(s=(n-i)/m+2>>1;s--;)

		for(j=n;j--;)

		{

			f[j+1][0]=mod(f[j+1][0]+f[j][0]);

			f[j+1][1]=mod(f[j+1][1]+mod(f[j][0]+f[j][1]));

			f[j][0]=mod(f[j][0]+f[j][1]);

			f[j][1]=0;

		}

		if(~((n-i)/m)&1)for(j=0;j<=n;j++)f[j][1]=0;

	}

	for(i=*a=1;i<=n;i++)a[i]=(long long)a[i-1]*i%p;

	for(i=0;i<=n;i++)x=i&1?(x+(long long)(p-a[n-i])*(f[i][0]+f[i][1]))%p:(x+(long long)a[n-i]*(f[i][0]+f[i][1]))%p;

	return 0&printf("%d\n",x);

}