#abc150d. [abc150_d]Semi Common Multiple
[abc150_d]Semi Common Multiple
Problem Statement
Given are a sequence of positive even numbers, and an integer .
Let a semi-common multiple of be a positive integer that satisfies the following condition for every :
- There exists a non-negative integer such that .
Find the number of semi-common multiples of among the integers between and (inclusive).
Constraints
- is an even number.
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the number of semi-common multiples of among the integers between and (inclusive).
Sample Input 1
2 50
6 10
Sample Output 1
2
Thus, and are semi-common multiples of . There are no other semi-common multiples of between and , so the answer is .
Sample Input 2
3 100
14 22 40
Sample Output 2
0
The answer can be .
Sample Input 3
5 1000000000
6 6 2 6 2
Sample Output 3
166666667