Under construction

Still being built. Things may change

Magnesium Supplementation

Interview

Time limit1sMemory limit1024 MB

Summary
Given n, k, and p, list every pill dosage d up to k that divides n, where n divided by d is at most p.
Level

Easy3 of 10

Topics
Number theory, Math
Solved
No attempts yet

Problem

At a recent doctor's appointment, Brandon has been marked as being deficient in magnesium. His doctor has advised him to take exactly some number of picograms of magnesium a day. His doctor can prescribe pills that have any integer number of picograms of magnesium from one up to a maximum. Brandon doesn't like taking pills though, so he refuses any prescription that requires him to take too many pills in a day.

Your task is to find all prescriptions that Brandon could be given. Note that all pills prescribed to Brandon must have the same dosage.

Input

The single line of input contains three integers nn, kk and pp (1≤n,k,p≤10111 \le n,k,p \le 10^{11}), where nn is the number of picograms per day that Brandon must take, kk is the maximum amount in picograms of magnesium in any of the pills, and pp is the maximum number of pills per day that Brandon is willing to take.

Output

On the first line, output a single integer, which is the number of prescriptions that Brandon could be given.

On each subsequent line, output a single integer, which is the number of picograms per pill in the prescription. Output the prescriptions in increasing order.

Examples2

  1. Example 1

    Input
    6 6 4
    
    Expected output
    3
    2
    3
    6
    
  2. Example 2

    Input
    6 2 3
    
    Expected output
    1
    2