{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eBaoBao receives lots of candies as his birthday gift. But this time he is not happy, because his heart was hurt by some terrible problem setters during the just-ended competitive programming contest season. To heal his heart, he invites his best friend DreamGrid to his dorm to enjoy the candies.\u003c/p\u003e\n\n\u003cp\u003eThere are two kinds of candies: green and blue. BaoBao enjoys green candies best, and DreamGrid likes blue candies. They have arranged their candies into \\(N\\) piles, the \\(i\\)-th pile has \\(a_i\\) green candies and \\(b_i\\) blue candies, and they decides to play a game.\u003c/p\u003e\n\n\u003cp\u003eIn one turn, BaoBao or DreamGrid can (and must, if possible) choose one pile of candies which contains his favorite candies, and eat any amount (at least one) of his favorite candies (That is to say, BaoBao can only eat green candies, and DreamGrid can only eat blue ones). The one who eats the last candy of all wins. If there is no candy for one to eat, his turn will be skipped.\u003c/p\u003e\n\n\u003cp\u003eThey will eat in turn, and BaoBao eats first. Now the two want to know, if they both use the best strategy, who will win the game?\u003c/p\u003e\n\n\u003cp\u003eFortunately, BaoBao has just learnt the \u003ci\u003eSG Function\u003c/i\u003e during the contest season. But soon he discovers with dismay that this is not a \u003ci\u003eNim Game\u003c/i\u003e, and it\u0027s not even a fair one. This problem is so difficult for him to solve. Can you please comfort poor BaoBao by solving this problem?\u003c/p\u003e\n\n\u003ch4\u003eInput\u003c/h4\u003e\n\u003cp\u003eThe first line of the input is an integer \\(T\\) (about 10), which indicates the number of test cases. Then \\(T\\) test cases follow.\u003c/p\u003e\n\n\u003cp\u003eThe first line of each test case contains one integer \\(N\\) (\\(1 \\le N \\le 1000\\)), indicating the number of candy piles.\u003c/p\u003e\n\n\u003cp\u003eThe second line contains \\(N\\) integers \\(a_1, a_2, \\dots, a_N\\) (\\(1 \\le a_i \\le 1000\\)), and the third line contains \\(N\\) integers \\(b_1, b_2, \\dots, b_N\\) (\\(1 \\le b_i \\le 1000\\)).\u003c/p\u003e\n\n\u003ch4\u003eOutput\u003c/h4\u003e\n\u003cp\u003eFor each test case output one line. If BaoBao wins, output \"BaoBao\" (without quotes), otherwise output \"DreamGrid\" (without quotes).\u003c/p\u003e\n\n\u003ch4\u003eSample\u003c/h4\u003e\n\u003ctable class\u003d\"vjudge_sample\"\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n2\n2 5\n3 3\n2\n3 3\n2 5\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eBaoBao\nDreamGrid\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n"}}]}