//博弈论,,
#include<stdio.h>
int main()
{
int t;
scanf("%d",&t);
int _case=1;
while(t--)
{
int n,m;
scanf("%d%d",&n,&m);
printf("Case #%d: ",_case++);
int sum = n*m;
n -= n%2;//奇数变偶数(去除边缘)
m -= m%2;
n = n/2;//统计个数
m = m/2;
int red = n*m/2;
if((n*m)%2) red ++;//重点:如果存在1行奇数列的情况要+1
red *=4;
int blue = sum- red;
if(blue>red)printf("Bob\n");
else if(blue==red) printf("Draw\n");
else printf("Ana\n");
}
return 0;
}