Modulus Jockey


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type
Allowed languages
C++, Java, Python

Craig has a list of n unique numbers and an infinite number line. For each value v_i in his list, he highlights all multiples of v_i on the number line. Once he's done, he asks you what the kth smallest number he highlighted was. Can you help him?

Input

The first line contains two integers, n and k (1 \leq n \leq 15, 1 \leq k \leq 10^9), indicating that there are n elements in your Craig's list, and he wants to find the kth highlighted number.

The next line contains n integers, v_1, \dots, v_n (1 \leq v_i \leq 10^9), the elements of Craig's list.

Output

Output the value of the kth smallest number Craig has highlighted.

Example

Input 1
2 8
3 5
Output 1
18

Craig highlighted every 3rd and 5th number, so 18 is the 8th highlighted number on the number line.

Input 2
3 15
2 3 5
Output 2
21
Input 3
7 10
2 4 6 8 10 12 14
Output 3
20
Input 4
1 1000000000
1000000000
Output 4
1000000000000000000

Comments

There are no comments at the moment.