Under construction

Still being built. Things may change

Sharing the Candy

Time limit2sMemory limit64 MB

Summary
For each X in [A,B], the number of even splits equals the number of divisors of X; find the maximum divisor count and all X achieving it.
Level

Medium6 of 10

Topics
Number theory, Math, Implementation, Brute force
Solved
No attempts yet

Problem

Ivica invited all of his friends to a big party. A party without candy is no party at all.

Ivica is afraid the candy will run short, so he will not buy fewer than AA pieces. His money is enough for at most BB pieces. Not every friend will come, so Ivica does not know how many people the party will have. He therefore wants to buy an amount that can be split evenly in as many ways as possible. A split is even when every friend who takes part receives the same number of pieces and none of the candy is left over. For example, if Ivica buys 66 pieces, there are four even splits: 1+1+1+1+1+11+1+1+1+1+1, 2+2+22+2+2, 3+33+3, 66.

Write a program that tells Ivica how many pieces of candy to buy.

Input

The first and only line contains two natural numbers AA and BB, separated by one space. (1≤A≤B≤2 000 0001 \le A \le B \le 2\,000\,000)

Output

Let MM be the largest number of even splits Ivica can reach. Let SS be the set of all integers XX in the interval [A,B][A, B] such that buying XX pieces of candy allows exactly MM even splits, and let NN be the number of elements of SS.

Print MM and NN on the first line, separated by one space. On each of the next NN lines print one element of SS, in increasing order.

Examples3

  1. Example 1

    Input
    1 10
    
    Expected output
    4 3
    6
    8
    10
    
  2. Example 2

    Input
    13 15
    
    Expected output
    4 2
    14
    15
    
  3. Example 3

    Input
    9125 1912412
    
    Expected output
    288 4
    1441440
    1663200
    1801800
    1884960