{"problem":{"name":"Crossing","description":{"content":"You are given an integer $N$. Determine if there exists a tuple of subsets of ${1,2,...N}$, $(S_1,S_2,...,S_k)$, that satisfies the following conditions: *   Each of the integers $1,2,...,N$ is conta","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"tenka1_2018_d"},"statements":[{"statement_type":"Markdown","content":"You are given an integer $N$. Determine if there exists a tuple of subsets of ${1,2,...N}$, $(S_1,S_2,...,S_k)$, that satisfies the following conditions:\n\n*   Each of the integers $1,2,...,N$ is contained in exactly two of the sets $S_1,S_2,...,S_k$.\n*   Any two of the sets $S_1,S_2,...,S_k$ have exactly one element in common.\n\nIf such a tuple exists, construct one such tuple.\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^5$\n*   $N$ is an integer.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"tenka1_2018_d","tags":[],"sample_group":[["3","Yes\n3\n2 1 2\n2 3 1\n2 2 3\n\nIt can be seen that $(S_1,S_2,S_3)=({1,2},{3,1},{2,3})$ satisfies the conditions."],["4","No"]],"created_at":"2026-03-03 11:01:14"}}