#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<algorithm>
using namespace std;
long long C(int n,int k)
{
long double s=1.0;
for(long double i=0.0;i<k;++i)
{
s*=(n-i)/(k-i);
}
return (long long)(s+0.5);
}
int main()
{
//freopen("in.txt","r",stdin);
int M,N;
while(scanf("%d%d",&M,&N)==2&&!(!M&&!N))
{
printf("%d things taken %d at a time is %lld exactly.\n",M,N,C(M,N));
}
return 0;
}