{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"### Read problems statements in [Hindi](https://www.codechef.com/download/translated/COOK102/hindi/ADASCOOL.pdf), [Mandarin Chinese](https://www.codechef.com/download/translated/COOK102/mandarin/ADASCOOL.pdf), [Russian](https://www.codechef.com/download/translated/COOK102/russian/ADASCOOL.pdf), [Vietnamese](https://www.codechef.com/download/translated/COOK102/vietnamese/ADASCOOL.pdf) and [Bengali](https://www.codechef.com/download/translated/COOK102/bengali/ADASCOOL.pdf) as well.\r\n\r\nAda\u0027s classroom contains $N \\cdot M$ tables distributed in a grid with $N$ rows and $M$ columns. Each table is occupied by exactly one student.\r\n\r\nBefore starting the class, the teacher decided to shuffle the students a bit. After the shuffling, each table should be occupied by exactly one student again. In addition, each student should occupy a table that is adjacent to that student\u0027s original table, i.e. immediately to the left, right, top or bottom of that table.\r\n\r\nIs it possible for the students to shuffle while satisfying all conditions of the teacher?\r\n\r\n### Input\r\n- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.\r\n- The first and only line of each test case contains two space-separated integers $N$ and $M$.\r\n\r\n### Output\r\nFor each test case, print a single line containing the string `\"YES\"` if it is possible to satisfy the conditions of the teacher or `\"NO\"` otherwise (without quotes).\r\n\r\n### Constraints \r\n- $1 \\le T \\le 5,000$\r\n- $2 \\le N, M \\le 50$"}},{"title":"Sample 1","value":{"format":"MD","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\n3 3\r\n4 4\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNO\r\nYES\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n**Example case 2:** The arrows in the following image depict how the students moved.\r\n\r\n![](CDN_BASE_URL/94915c0d53227ba028d2534563a1dc26?v\u003d1715731548)"}}]}