#include #include #include #include #include #include #include #include using namespace std; using ll = long long; #define rep(i, j, n) for (int i = j; i < (n); ++i) #define rrep(i, j, n) for (int i = (n)-1; j <= i; --i) #define all(a) a.begin(), a.end() template std::ostream &operator<<(std::ostream &os, std::vector &a) { for (size_t i = 0; i < a.size(); ++i) os << (i > 0 ? " " : "") << a[i]; return os << '\n'; } template std::istream &operator>>(std::istream &is, std::vector &a) { for (T &x : a) { is >> x; } return is; } int main() { cin.tie(0)->sync_with_stdio(0); int n; cin >> n; vector a; ll cnt = 0, g = 0; rep(i, 0, n) { ll t; cin >> t; if (t == 0) ++cnt; else a.push_back(t); } sort(all(a)); vector b; rep(i, 0, (int)a.size() - 1) b.push_back(a[i + 1] - a[i]); for (ll c : b) g = gcd(g, c); if (g == 0) cout << "Yes"; else { for (ll c : b) cnt -= c / g - 1; cout << (cnt < 0 ? "No" : "Yes"); } return 0; }