#include #include using namespace std; using namespace atcoder; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll inf=144494; ll mod=1000000007; ll gcd(ll a, ll b) { a = abs(a); b = abs(b); if (a < b)swap(a, b); while (b) { ll r=a%b; a=b; b=r; } return a; } int main(){ ll a,b,c; cin >> a >> b >> c; a=gcd(a,b); a=gcd(a,c); ll x; cin >> x; if (x%a==0) { cout << "Yes" << endl; }else{ cout << "No" << endl; } }