NSC
Hard
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
The least common multiple (LCM) of a set of numbers is the smallest natural number that is divisible by each number in the set.
Given two numbers, N and K, your task is to find a set of N distinct natural numbers such that their least common multiple is exactly K. Importantly, none of these numbers should be equal to K itself.
Input
The input consists of a single line containing two integers, N and K (1 ≤ N ≤ 1000, 1 ≤ K ≤ 10^9), separated by a space.
Output
If no such set of numbers exists, print -1 on the first line of the output. If a valid set can be found, print the N numbers on a single line, separated by spaces. If there are multiple possible sets, you may output any one of them.
Examples
Input #1
Answer #1
Submissions 207
Acceptance rate 8%