Problem F

Statement
Copy Copied
Description:
Imp is really pleased that you helped him. But it you solve the last problem, his gladness would raise even more.

- a is strictly less than b;
- a divides b without a remainder.

You are to find such a set $$1$$, which is a subset of {1, 2, ..., n} (the set that contains all positive integers not greater than n), that $$f(\mathbf{I}) = k$$.

Input Format:
The only line contains two integers n and k $$( 2 \leq n \leq 3 \cdot 10^{5}, 1 \leq k \leq \min ( 10^{9}, \frac { n \cdot ( n - 1 ) } { 2 } ) )$$.

Output Format:
If there is no answer, print "No".

Otherwise, in the first line print "Yes", in the second — an integer m that denotes the size of the set $$1$$ you have found, in the second line print m integers — the elements of the set $$1$$, in any order.

If there are multiple answers, print any of them.

Note:
In the second sample, the valid pairs in the output set are (1, 2), (1, 4), (1, 5), (1, 6), (2, 4), (2, 6). Thus, $$f(\{1,2,4,5,6\})=6$$.

In the third example, the valid pairs in the output set are (2, 4), (4, 8), (2, 8). Thus, $$f(\{2,4,5,8\})=3$$.

Submissions

IDLanguageExit CodeTimestampCodeStdoutStderrRetry
5097 go 0 2026-03-09T14:54:12.953771Z View View View Retry

Evaluations

Eval IDRun IDProviderModelLangSuccessTimestampPromptResponseStdoutStderrRetry
2943 20260318-220006 openai gpt-5.4 go true 2026-03-18T23:31:22.915377Z View View View View Retry
1999 20260309-082658 openai gpt-5.4 go false 2026-03-09T11:47:58.593289Z View View View View Retry