Time Limit: 2000/1000 MS (Java/Others)

Memory Limit: 32768/32768 K (Java/Others)

Long long ago, a problem was spread all over the world , but no one could solve it . Now, due to the Internet , it has been solved perfectly(See figure 1).

Now here’s a problem much harmonious.

ErEr has big cake weighing m grams , at the same time he has n children . and every children want a part of the cake weighs even number(偶数) of grams. The children are extremely hungry and want to start their meal as soon as possible, that's why you should help them and find out, if they can divide the cake in the way they want. For sure, each of them should get a part of positive weight.

Now here’s a problem much harmonious.

ErEr has big cake weighing m grams , at the same time he has n children . and every children want a part of the cake weighs even number(偶数) of grams. The children are extremely hungry and want to start their meal as soon as possible, that's why you should help them and find out, if they can divide the cake in the way they want. For sure, each of them should get a part of positive weight.

The first line of input gives the number of cases, T (at most 100).

each case has there numbers m,n. (1<=m<=10000，1<=n<=100)

each case has there numbers m,n. (1<=m<=10000，1<=n<=100)

提交代码