local mfl, mce = math.floor, math.ceil local function getgcd(x, y) while 0 < x do x, y = y % x, x end return y end local n = io.read("*n") local a = {} for i = 1, n do a[i] = io.read("*n") end table.sort(a, function(x, y) return x > y end) for i = n, 1, -1 do if a[i] == 0 then table.remove(a) else break end end local zeros = n - #a n = #a if n <= 2 then print("Yes") os.exit() end local same, allsame = false, true for i = 1, n - 1 do if a[i] == a[i + 1] then same = true else allsame = false end end if allsame then print("Yes") os.exit() end if same then print("No") os.exit() end local gcd = a[1] - a[2] for i = 2, n - 1 do gcd = getgcd(gcd, a[i] - a[i + 1]) end local len = mfl((a[1] - a[n]) / gcd) local need = len + 1 - n if need <= zeros then print("Yes") else print("No") end