#include <iostream>
using namespace std;
long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
int main() 
{ 
    long long aa,b,c;
    cin>>aa>>b>>c;
    int a = aa%10;
    int ans=0;
    if(a==0||a==1||a==5||a==6){
        ans=a;
    }else if(a==4){
        if(b%2==0){
            ans=6;
        }else{
            ans=4;
        }
    }else if(a==9){
        if(b%2==0){
            ans=1;
        }else{
            ans=9;
        }
    }else{
        long long mod = 0;
        mod =modpow(b,c,4);
        if(mod==0){
            if(a==2) ans=6;
            if(a==3) ans=1;
            if(a==7) ans=1;
            if(a==8) ans=6;
        }else if(mod==1){
            ans=a;      
        }else if(mod==2){
            if(a==2) ans=4;
            if(a==3) ans=9;
            if(a==7) ans=9;
            if(a==8) ans=4;
        }else{
            if(a==2) ans=8;
            if(a==3) ans=7;
            if(a==7) ans=3;
            if(a==8) ans=2;          
        }         
    }
    cout<<ans<<endl;
    return 0; 
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define vii vector<vector<int>>
#define pb push_back
#define f1(i,l,r) for(i=l;i<=r;i++)
#define f2(a,b) for(auto a:b)
#define all(v) v.begin(),v.end()
#define mp make_pair
#define pi pair<int,int>
 
int main()
    {
    	float V,T,S,D;
    	cin>>V>>T>>S>>D;
    	float ins;
    	ins=D/V;
    	if(ins<T||ins>S) cout<<"Yes";
    	else cout<<"No";
	}