local function getgcd(x, y) while 0 < x do x, y = y % x, x end return y end n, h = io.read("*n", "*n") for i = 1, n do a = io.read("*n") v = getgcd(h, a) h = math.floor(h / v) end print(h == 1 and "YES" or "NO")