#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
void solve(int cs) {
int x, a, b, c, n;
cin >> x >> a >> b >> c >> n;
n -= x;
if (n <= 0) {
cout << "NO\n";
return;
}
int res = 1e9;
for (int i = 0; i <= 200; i++) {
for (int j = 0; j <= 200; j++) {
for (int k = 0; k <= 200; k++) {
int now = i * a + j * b + k * c;
if (now == n) {
res = min(res, i + j + k);
}
}
}
}
if (res == 1e9) cout << "NO\n";
else {
cout << "YES\n";
cout << res << "\n";
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int tc = 1;
// cin >> tc;
for (int cs = 1; cs <= tc; cs++) {
solve(cs);
}
return 0;
}