/*CODED BY mahmudulsakib2019
DATE:-02/04/2024;TIME:-07:49 AM
BANGALDESH , SYLHET*/
///PROBLEM LINK:-https://judge.eluminatis-of-lu.com/p/1028
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
int main(){
int X,a,b,c,N,count=0;
cin >> X >>a >> b >> c >> N;
vector<ll>p;
for(int l=0;l<=200;l++){
for(int z=0;z<=200;z++){
for(int q =0;q<=200;q++){
if((X+(l*a)+(z*b)+(q*c))==N){
p.push_back(l+z+q);
}
}
}
}
if(p.size()>0){
cout << "YES\n" << *min_element(p.begin(),p.end()) << endl;
}
else{
cout << "NO" ;
}
return 0;
}