{"problem":{"name":"B. Resource Distribution","description":{"content":"One department of some software company has $n$ servers of different specifications. Servers are indexed with consecutive integers from $1$ to $n$. Suppose that the specifications of the $j$\\-th serve","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF925B"},"statements":[{"statement_type":"Markdown","content":"One department of some software company has $n$ servers of different specifications. Servers are indexed with consecutive integers from $1$ to $n$. Suppose that the specifications of the $j$\\-th server may be expressed with a single integer number $c_j$ of artificial resource units.\n\nIn order for production to work, it is needed to deploy two services $S_1$ and $S_2$ to process incoming requests using the servers of the department. Processing of incoming requests of service $S_i$ takes $x_i$ resource units.\n\nThe described situation happens in an advanced company, that is why each service may be deployed using not only one server, but several servers simultaneously. If service $S_i$ is deployed using $k_i$ servers, then the load is divided equally between these servers and each server requires only $x_i / k_i$ (that may be a fractional number) resource units.\n\nEach server may be left unused at all, or be used for deploying exactly one of the services (but not for two of them simultaneously). The service should not use more resources than the server provides.\n\nDetermine if it is possible to deploy both services using the given servers, and if yes, determine which servers should be used for deploying each of the services.\n\n## Input\n\nThe first line contains three integers $n$, $x_1$, $x_2$ ($2 \\leq n \\leq 300\\,000$, $1 \\leq x_1, x_2 \\leq 10^9$) — the number of servers that the department may use, and resource units requirements for each of the services.\n\nThe second line contains $n$ space-separated integers $c_1, c_2, \\ldots, c_n$ ($1 \\leq c_i \\leq 10^9$) — the number of resource units provided by each of the servers.\n\n## Output\n\nIf it is impossible to deploy both services using the given servers, print the only word \"_No_\" (without the quotes).\n\nOtherwise print the word \"_Yes_\" (without the quotes).\n\nIn the second line print two integers $k_1$ and $k_2$ ($1 \\leq k_1, k_2 \\leq n$) — the number of servers used for each of the services.\n\nIn the third line print $k_1$ integers, the indices of the servers that will be used for the first service.\n\nIn the fourth line print $k_2$ integers, the indices of the servers that will be used for the second service.\n\nNo index may appear twice among the indices you print in the last two lines. If there are several possible answers, it is allowed to print any of them.\n\n[samples]\n\n## Note\n\nIn the first sample test each of the servers 1, 2 and 6 will will provide $8 / 3 = 2.(6)$ resource units and each of the servers 5, 4 will provide $16 / 2 = 8$ resource units.\n\nIn the second sample test the first server will provide $20$ resource units and each of the remaining servers will provide $32 / 3 = 10.(6)$ resource units.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"某个软件公司的某个部门拥有 $n$ 台不同规格的服务器。服务器的编号为从 $1$ 到 $n$ 的连续整数。假设第 $j$ 台服务器的规格可以用一个整数 $c_j$（单位为人工资源单位）表示。\n\n为了使生产正常运行，需要使用该部门的服务器部署两个服务 $S_1$ 和 $S_2$ 来处理传入的请求。处理服务 $S_i$ 的传入请求需要 $x_i$ 个资源单位。\n\n由于该公司属于先进公司，每个服务不仅可以使用单台服务器部署，还可以同时使用多台服务器。如果服务 $S_i$ 使用 $k_i$ 台服务器部署，则负载将平均分配给这些服务器，每台服务器仅需提供 $x_i \\/ k_i$（可能为分数）个资源单位。\n\n每台服务器可以完全不使用，或仅用于部署其中一个服务（不能同时用于两个服务）。部署的服务所使用的资源不得超过服务器提供的资源。\n\n请判断是否可以使用给定的服务器部署这两个服务；如果可以，请确定每项服务应使用哪些服务器。\n\n第一行包含三个整数 $n$, $x_1$, $x_2$（$2 lt.eq n lt.eq 300 thin 000$，$1 lt.eq x_1, x_2 lt.eq 10^9$）——部门可使用的服务器数量以及每个服务所需的资源单位数。\n\n第二行包含 $n$ 个用空格分隔的整数 $c_1, c_2, dots.h, c_n$（$1 lt.eq c_i lt.eq 10^9$）——每台服务器提供的资源单位数。\n\n如果无法使用给定的服务器部署这两个服务，请仅输出单词 \"_No_\"（不含引号）。\n\n否则，请输出单词 \"_Yes_\"（不含引号）。\n\n第二行输出两个整数 $k_1$ 和 $k_2$（$1 lt.eq k_1, k_2 lt.eq n$）——分别用于两个服务的服务器数量。\n\n第三行输出 $k_1$ 个整数，表示用于第一个服务的服务器的编号。\n\n第四行输出 $k_2$ 个整数，表示用于第二个服务的服务器的编号。\n\n最后两行中打印的编号不能重复。如果有多种可能的答案，允许输出其中任意一种。\n\n在第一个样例中，服务器 1、2 和 6 每台提供 $8 \\/ 3 = 2. (6)$ 个资源单位，服务器 5 和 4 每台提供 $16 \\/ 2 = 8$ 个资源单位。\n\n在第二个样例中，第一台服务器提供 $20$ 个资源单位，其余每台服务器提供 $32 \\/ 3 = 10. (6)$ 个资源单位。\n\n## Input\n\n第一行包含三个整数 $n$, $x_1$, $x_2$（$2 lt.eq n lt.eq 300 thin 000$，$1 lt.eq x_1, x_2 lt.eq 10^9$）——部门可使用的服务器数量以及每个服务所需的资源单位数。第二行包含 $n$ 个用空格分隔的整数 $c_1, c_2, dots.h, c_n$（$1 lt.eq c_i lt.eq 10^9$）——每台服务器提供的资源单位数。\n\n## Output\n\n如果无法使用给定的服务器部署这两个服务，请仅输出单词 \"_No_\"（不含引号）。否则请输出单词 \"_Yes_\"（不含引号）。第二行输出两个整数 $k_1$ 和 $k_2$（$1 lt.eq k_1, k_2 lt.eq n$）——分别用于两个服务的服务器数量。第三行输出 $k_1$ 个整数，表示用于第一个服务的服务器的编号。第四行输出 $k_2$ 个整数，表示用于第二个服务的服务器的编号。最后两行中打印的编号不能重复。如果有多种可能的答案，允许输出其中任意一种。\n\n[samples]\n\n## Note\n\n在第一个样例中，服务器 1、2 和 6 每台提供 $8 \\/ 3 = 2. (6)$ 个资源单位，服务器 5 和 4 每台提供 $16 \\/ 2 = 8$ 个资源单位。在第二个样例中，第一台服务器提供 $20$ 个资源单位，其余每台服务器提供 $32 \\/ 3 = 10. (6)$ 个资源单位。","is_translate":true,"language":"Chinese"}],"meta":{"iden":"CF925B","tags":["binary search","implementation","sortings"],"sample_group":[["6 8 16\n3 5 2 9 8 7","Yes\n3 2\n1 2 6\n5 4"],["4 20 32\n21 11 11 12","Yes\n1 3\n1\n2 3 4"],["4 11 32\n5 5 16 16","No"],["5 12 20\n7 8 4 11 9","No"]],"created_at":"2026-03-03 11:00:39"}}