/*CODED BY mahmudulsakib2019
DATE:-4/3/2024;TIME:-23:05 pm
BANGALDESH , SYLHET*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int X, a, b, c, N;
cin >> X >> a >> b >> c >> N;
vector<int> dp(N + 1, 1e9);
dp[X] = 0;
for (int i = X; i <= N; ++i) {
if (i + a <= N) dp[i + a] = min(dp[i + a], dp[i] + 1);
if (i + b <= N) dp[i + b] = min(dp[i + b], dp[i] + 1);
if (i + c <= N) dp[i + c] = min(dp[i + c], dp[i] + 1);
}
if (dp[N] == 1e9) {
cout << "NO" << endl;
} else {
cout << "YES" << endl;
cout << dp[N] << endl;
}
return 0;
}