#include <stdio.h>
void main()
{
int head,feet,chead,rhead,cfeet,rfeet;
scanf("%d %d",&head,&feet);
for(rhead=0;rhead<=head;rhead++)
{
chead=head-rhead;
cfeet=chead*2;
rfeet=rhead*4;
if(feet==cfeet+rfeet)
{
printf("chicken : %d
rabbit : %d",chead,rhead);
exit(0);
}
}
printf("fail!\n");
}