output_description: If the coins add up to X yen or more, print `Yes`; otherwise, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      K X
attempt: import fractions
  from functools import reduce
  
  
  def gcd(*numbers):
      return reduce(fractions.gcd, numbers)
  
  
  def lcm_base(x, y):
      return (x * y) // fractions.gcd(x, y)
  
  
  def lcm(*numbers):
      return reduce(lcm_base, numbers, 1)
  
  
  def factorization(n):
      arr = []
      temp = n
      for i in range(2, int(-(-(n**0.5) // 1)) + 1):
          if temp % i == 0:
              cnt = 0
              while temp % i == 0:
                  cnt += 1
                  temp //= i
              arr.append([i, cnt])
  
      if temp != 1:
          arr.append([temp, 1])
  
      if arr == []:
          arr.append([n, 1])
  
      return arr
  
  
  N, M = map(int, input().split())
  A = list(map(int, input().split()))
  
  # if gcd(*A) % 2 != 0:
  # print(0)
  # exit(0)
  
  # sisu_2 = factorization(A[0])[0][1]
  sisu_2 = min([factorization(A[i])[0][1] for i in range(min(1000, N))])
  
  # lcm_a = lcm(*A)
  # lcm_a_half = lcm_a // 2
  lcm_a = lcm(*A) // 2
  """
  l = []
  sisu_a0 = 0
  for i in range(N):
      sisu = 0
      while A[i]%2==0:
          A[i] //= 2
          sisu += 1
      
      if sisu_a0==0:
          sisu_a0 = sisu
      else:
          if sisu_a0!=sisu:
              print(0)
              exit()
  """
  if (lcm_a % (2**sisu_2) == 0) or lcm_a > M:
      # factorization(lcm_a)[0][1] != sisu_2 or lcm_a_half > M:
      # if lcm_a > M:
      print(0)
      exit(0)
  else:
      print(int((M - lcm_a) // (lcm_a * 2) + 1))
  
problem_description: Statement
  
  Takahashi has K 500-yen coins. (Yen is the currency of Japan.) If these coins
  add up to X yen or more, print `Yes`; otherwise, print `No`.
samples: [{"input": "2 900", "output": "Yes\n    \n\nTwo 500-yen coins add up to 1000 yen, which is not less than X = 900 yen.\n\n* * *"}, {"input": "1 501", "output": "No\n    \n\nOne 500-yen coin is worth 500 yen, which is less than X = 501 yen.\n\n* * *"}, {"input": "4 2000", "output": "Yes\n    \n\nFour 500-yen coins add up to 2000 yen, which is not less than X = 2000 yen."}]