#include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define rep(i, n) for(int i = 0; i < (n); i++) template using vi = vector; template using vii = vector>; template using viii = vector>; void chmax(ll & x, ll y) { x = max(x, y); } void pf(int n, vi& prime, vi& cnt, bool plus = true) { if (n == 1) return; if (plus) cnt[prime[n]]++; else cnt[prime[n]]--; pf(n / prime[n], prime, cnt, plus); return; } ll modpow(ll x, ll n, ll mod) { if (n == 0) return 1LL; ll res = modpow(x, n / 2, mod); res *= res; res %= mod; if (n % 2) res *= x; res %= mod; return res; } int main() { int n, m; cin >> n >> m; vi prime(n + 1); prime[1] = 1; for (int i = 2; i <= n; i++) { if (prime[i]) continue; prime[i] = i; for (ll j = (ll)i * i; j <= n; j += i) { if (prime[j]) continue; prime[j] = i; } } prime[1] = 1; vi cnt(n + 1); m = min(n - m, m); rep(i, m) { pf(n - i, prime, cnt); pf(m - i, prime, cnt, false); } ll ans = 1; const ll mod = 1e8; for (int i = 2; i <= n; i++) { if (cnt[i] == 0) continue; ans *= modpow(i, cnt[i], mod); ans %= mod; } printf("%08d\n", ans); return 0; }