/*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<int>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);
}
}
}
}
auto it =*min_element(p.begin(),p.end());
if(!p.empty()){
cout << "YES\n" << it << endl;
}
else{
cout << "NO" ;
}
return 0;
}