{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eAlice and Bob are playing a stone game in a board of $n\\times m$ cells.\u003cbr\u003e\u003cbr\u003eIn the begining, the stone is in the upperleft cell. And in each turn, they can move the stone one cell to the right or one cell down, or diagonally $k$ cells down to the right, which means if you are at $(x,y)$, then you could move into $(x+1,y)$, $(x,y+1)$ or $(x+k,y+k)$ at the next step. The player who can not move loses. They play in turns and Alice moves first.\u003cbr\u003e\u003cbr\u003eNow given $n$, $m$ and $k$, could you tell me who is the winner?\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"First line contains an integer $T(1\\leq T\\leq 10)$, denoting the number of test cases.\u003cbr\u003e\u003cbr\u003eIn each test case, the first line is two integers $Q$ and $k$.\u003cbr\u003eIn the following $Q$ lines, each line contains $n$ and $m$.$(1\\leq Q\\leq 1000,1\\leq k,n,m\\leq 10^9)$"}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output $Q$ lines.\u003cbr\u003eIf Alice is the winner, output ``Alice\u0027\u0027. Otherwise ``Bob\u0027\u0027.\u003cbr\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\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\r\n2 1\r\n4 5\r\n3 4\r\n2 3\r\n4 5\r\n5 6\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eAlice\r\nAlice\r\nAlice\r\nBob\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}