#pragma GCC optimize("O3") #include using namespace std; #define rep(i,n) for(int i = 0; i < (int)(n); ++i) #define rrep(i,n) for(int i = (int)(n) - 1; i >= 0; --i) #define ALL(a) a.begin(), a.end() #define Sort(a) sort(a.begin(), a.end()) #define RSort(a) sort(a.rbegin(), a.rend()) typedef long long int ll; typedef long double ld; typedef vector vi; typedef vector vll; typedef vector vc; typedef vector vst; typedef vector vd; typedef pair P; const long long INF = 0x1fffffffffffffff; const long long MOD = 1000000007; const long double PI = acos(-1); template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } template inline T vin(T& vec, U n) { vec.resize(n); for(int i = 0; i < (int) n; ++i) cin >> vec[i]; return vec; } template inline void vout(T vec, string s = "\n"){ for(auto x : vec) cout << x << s; } template void in(T&... a){ (cin >> ... >> a); } void out(){ cout << '\n'; } template void out(const T& a, const Ts&... b){ cout << a; (cout << ... << (cout << ' ', b)); cout << '\n'; } template void inGraph(vector>& G, U n, U m, bool directed = false){ G.resize(n); for(int i = 0; i < m; i++){ int a, b; cin >> a >> b; a--, b--; G[a].push_back(b); if(!directed) G[b].push_back(a); } } template struct PrimeFact{ vector spf; PrimeFact(T N){ init(N); } void init(T N){ spf.assign(N + 1, 0); for(T i = 0; i <= N; i++) spf[i] = i; for(T i = 2; i * i <= N; i++) { if(spf[i] == i) { for(T j = i * i; j <= N; j += i){ if(spf[j] == j){ spf[j] = i; } } } } } /* map get(T n){ map m; while(n != 1){ if(m.count(spf[n]) == 0){ m[spf[n]] = 1; }else{ m[spf[n]]++; } n /= spf[n]; } return m; } */ vector get(T n){ vector m; while(n != 1){ m.emplace_back(spf[n]); n /= spf[n]; } return m; } }; template T modpow(T x, T n, const T &m){ T ret = 1 % m; x %= m; while(n > 0){ if(n & 1) (ret *= x) %= m; (x *= x) %= m; n >>= 1; } return ret; } ll m, n; void input(){ in(m, n); } void solve(){ if(m < n){ out("00000000"); return; } ll mod = 100000000; n = min(n, m - n); ll mn = m - n + 1; vector mul(m + 1); PrimeFact f(m); for(int i = 2; i <= n; i++){ vector r = f.get(i); for(int x : r){ mul[x]--; } } vector p; for(int i = mn; i <= m; i++){ vector r = f.get(i); for(int x : r){ mul[x]++; if(mul[x] == 1) p.emplace_back(x); } } ll ans = 1; for(int x : p){ ans *= modpow((ll) x, mul[x], mod); ans %= mod; } string ans2 = to_string(ans); while(ans2.size() < 8){ ans2 = '0' + ans2; } out(ans2); } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); input(); solve(); }