#include using namespace std; #include using namespace atcoder; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair #define LP pair #define fi first #define se second #define pb push_back #define eb emplace_back #define all(s) s.begin(), s.end() #define rall(s) s.rbegin(), s.rend() template void chmax(T& a, T b) { a = max(a, b); }; template void chmin(T& a, T b) { a = min(a, b); }; int main() { ll a, b, c, x; cin >> a >> b >> c >> x; ll g = gcd(a,b); g = gcd(g,c); if (x%g==0) cout << "Yes" << endl; else cout << "No" << endl; return 0; }