#include<bits/stdc++.h> // #define SINGLE_INPUT #define ll long long #define ull unsigned long long #define N 500005 #define MOD 998244353 usingnamespace std;
voidsol(){ ll n, k; cin >> n >> k; vector<ll> a(n); for (auto& i : a) cin >> i; sort(a.begin(), a.end()); ll g = 0; for (int i = 1; i < n; i++) { g = gcd(g, a[i] - a[i - 1]); }; if ((k - a[0]) % g == 0) { cout << "YES\n"; } else { cout << "NO\n"; } }