#include<iostream> #include<cstdio> using namespace std; #define ll long long int main(){ ll N,M,ans,i,q; while(scanf("%lld%lld",&N,&M)==2&&N){ ans = 1; if(N-M<M){ q = N-M; } else{ q = M; } for(ll i=1;i<=q;i++){ ans = ans*(N-q+i)/i; } printf("%lld things taken %lld at a time is %lld exactly.\n",N,M,ans); } return 0; }