{"problem":{"name":"A. Hungry Student Problem","description":{"content":"Ivan's classes at the university have just finished, and now he wants to go to the local CFK cafe and eat some fried chicken. CFK sells chicken chunks in small and large portions. A small portion con","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF903A"},"statements":[{"statement_type":"Markdown","content":"Ivan's classes at the university have just finished, and now he wants to go to the local CFK cafe and eat some fried chicken.\n\nCFK sells chicken chunks in small and large portions. A small portion contains 3 chunks; a large one — 7 chunks. Ivan wants to eat exactly _x_ chunks. Now he wonders whether he can buy exactly this amount of chicken.\n\nFormally, Ivan wants to know if he can choose two non-negative integers _a_ and _b_ in such a way that _a_ small portions and _b_ large ones contain exactly _x_ chunks.\n\nHelp Ivan to answer this question for several values of _x_!\n\n## Input\n\nThe first line contains one integer _n_ (1 ≤ _n_ ≤ 100) — the number of testcases.\n\nThe _i_\\-th of the following _n_ lines contains one integer _x__i_ (1 ≤ _x__i_ ≤ 100) — the number of chicken chunks Ivan wants to eat.\n\n## Output\n\nPrint _n_ lines, in _i_\\-th line output _YES_ if Ivan can buy exactly _x__i_ chunks. Otherwise, print _NO_.\n\n[samples]\n\n## Note\n\nIn the first example Ivan can buy two small portions.\n\nIn the second example Ivan cannot buy exactly 5 chunks, since one small portion is not enough, but two small portions or one large is too much.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"Ivan 的大学课程刚刚结束，他现在想去当地的 CFK 餐厅吃一些炸鸡。\n\nCFK 将鸡块分为小份和大份出售。一份小份包含 $3$ 个鸡块；一份大份包含 $7$ 个鸡块。Ivan 想要恰好吃掉 $x$ 个鸡块。现在他想知道是否能够恰好买到这个数量的鸡块。\n\n形式上，Ivan 想知道是否存在两个非负整数 $a$ 和 $b$，使得 $a$ 份小份和 $b$ 份大份恰好包含 $x$ 个鸡块。\n\n请帮助 Ivan 对多个 $x$ 的值回答这个问题！\n\n第一行包含一个整数 $n$ ($1 ≤ n ≤ 100$) —— 测试用例的数量。\n\n接下来的 $n$ 行中，第 $i$ 行包含一个整数 $x_i$ ($1 ≤ x_i ≤ 100$) —— Ivan 想要吃的鸡块数量。\n\n请输出 $n$ 行，在第 $i$ 行输出 _YES_（如果 Ivan 可以恰好买到 $x_i$ 个鸡块），否则输出 _NO_。\n\n在第一个例子中，Ivan 可以购买两份小份。\n\n在第二个例子中，Ivan 无法恰好买到 $5$ 个鸡块，因为一份小份不够，但两份小份或一份大份都太多了。\n\n## Input\n\n第一行包含一个整数 $n$ ($1 ≤ n ≤ 100$) —— 测试用例的数量。接下来的 $n$ 行中，第 $i$ 行包含一个整数 $x_i$ ($1 ≤ x_i ≤ 100$) —— Ivan 想要吃的鸡块数量。\n\n## Output\n\n请输出 $n$ 行，在第 $i$ 行输出 _YES_（如果 Ivan 可以恰好买到 $x_i$ 个鸡块），否则输出 _NO_。\n\n[samples]\n\n## Note\n\n在第一个例子中，Ivan 可以购买两份小份。在第二个例子中，Ivan 无法恰好买到 $5$ 个鸡块，因为一份小份不够，但两份小份或一份大份都太多了。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ i \\in \\{1, \\dots, n\\} $, let $ x_i \\in \\mathbb{Z} $ be the target number of chicken chunks.\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 100 $  \n2. For each $ i $, $ 1 \\leq x_i \\leq 100 $\n\n**Objective**  \nFor each $ x_i $, determine whether there exist non-negative integers $ a, b \\in \\mathbb{Z}_{\\geq 0} $ such that:  \n$$\n3a + 7b = x_i\n$$  \nOutput \"YES\" if such $ a, b $ exist; otherwise, output \"NO\".","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF903A","tags":["greedy","implementation"],"sample_group":[["2\n6\n5","YES\nNO"]],"created_at":"2026-03-03 11:00:39"}}