#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); } } vector spf; vector mul; void init(int N){ spf.assign(N + 1, 0); for(int i = 0; i <= N; i++) spf[i] = i; for(int i = 2; i * i <= N; i++) { if(spf[i] == i) { for(int j = i * i; j <= N; j += i){ if(spf[j] == j){ spf[j] = i; } } } } } void get(int n){ while(n != 1){ mul.emplace_back(spf[n]); n /= spf[n]; } } 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); init(m); for(int i = 2; i <= n; i++){ int f = i; while(f != 1){ mul[spf[f]]--; f /= spf[f]; } } vector p; for(int i = mn; i <= m; i++){ int f = i; while(f != 1){ mul[spf[f]]++; if(mul[spf[f]] == 1) p.emplace_back(spf[f]); f /= spf[f]; } } 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(); }