{"problem":{"name":"Teleporter Takahashi","description":{"content":"Takahashi is on an $xy$\\-plane. Initially, he is at point $(s _ x,s _ y)$, and he wants to reach point $(t _ x,t _ y)$. On the $xy$\\-plane is a rectangle $R\\coloneqq\\lbrace(x,y)\\mid a-0.5\\leq x\\leq b+","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc289_f"},"statements":[{"statement_type":"Markdown","content":"Takahashi is on an $xy$\\-plane. Initially, he is at point $(s _ x,s _ y)$, and he wants to reach point $(t _ x,t _ y)$.\nOn the $xy$\\-plane is a rectangle $R\\coloneqq\\lbrace(x,y)\\mid a-0.5\\leq x\\leq b+0.5,c-0.5\\leq y\\leq d+0.5\\rbrace$. Consider the following operation:\n\n*   Choose a lattice point $(x,y)$ contained in the rectangle $R$. Takahashi teleports to the point symmetric to his current position with respect to point $(x,y)$.\n\nDetermine if he can reach point $(t _ x,t _ y)$ after repeating the operation above between $0$ and $10^6$ times, inclusive. If it is possible, construct a sequence of operations that leads him to point $(t _ x,t _ y)$.\n\n## Constraints\n\n*   $0\\leq s _ x,s _ y,t _ x,t _ y\\leq2\\times10^5$\n*   $0\\leq a\\leq b\\leq2\\times10^5$\n*   $0\\leq c\\leq d\\leq2\\times10^5$\n*   All values in the input are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$s _ x$ $s _ y$\n$t _ x$ $t _ y$\n$a$ $b$ $c$ $d$\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"高桥在 $xy$ 平面上。初始时，他位于点 $(s _ x,s _ y)$，他希望到达点 $(t _ x,t _ y)$。\n在 $xy$ 平面上有一个矩形 $R\\coloneqq\\lbrace(x,y)\\mid a-0.5\\leq x\\leq b+0.5,c-0.5\\leq y\\leq d+0.5\\rbrace$。考虑以下操作：\n\n* 选择矩形 $R$ 中的一个格点 $(x,y)$。高桥瞬移到他当前位置关于点 $(x,y)$ 的对称点。\n\n判断他是否能在重复上述操作 $0$ 到 $10^6$ 次（含）后到达点 $(t _ x,t _ y)$。如果可以，请构造一个操作序列，使其到达点 $(t _ x,t _ y)$。\n\n## Constraints\n\n* $0\\leq s _ x,s _ y,t _ x,t _ y\\leq2\\times10^5$\n* $0\\leq a\\leq b\\leq2\\times10^5$\n* $0\\leq c\\leq d\\leq2\\times10^5$\n* 输入中的所有值均为整数。\n\n## Input\n\n输入从标准输入按以下格式给出：\n\n$s _ x$ $s _ y$\n$t _ x$ $t _ y$\n$a$ $b$ $c$ $d$\n\n[samples]","is_translate":true,"language":"Chinese"}],"meta":{"iden":"abc289_f","tags":[],"sample_group":[["1 2\n7 8\n7 9 0 3","Yes\n7 0\n9 3\n7 1\n8 1\n\nFor example, the following choices lead him from $(1,2)$ to $(7,8)$.\n\n*   Choose $(7,0)$. Takahashi moves to $(13,-2)$.\n*   Choose $(9,3)$. Takahashi moves to $(5,8)$.\n*   Choose $(7,1)$. Takahashi moves to $(9,-6)$.\n*   Choose $(8,1)$. Takahashi moves to $(7,8)$.\n\n![image](https://img.atcoder.jp/abc289/d6d2cc458bbc92e975ba267856f673cf.png)\nAny output that satisfies the conditions is accepted; for example, printing\n\nYes\n7 3\n9 0\n7 2\n9 1\n8 1\n\nis also accepted.\n![image](https://img.atcoder.jp/abc289/3faa56b1d245b87bd4cc36083495383c.png)"],["0 0\n8 4\n5 5 0 0","No\n\nNo sequence of operations leads him to point $(8,4)$.\n![image](https://img.atcoder.jp/abc289/eb363d09e74f89c5474a4fc7529308bc.png)"],["1 4\n1 4\n100 200 300 400","Yes\n\nTakahashi may already be at the destination in the beginning."],["22 2\n16 7\n14 30 11 14","No"]],"created_at":"2026-03-03 11:01:14"}}