#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    long double p,q,r,L,D,N = 0,S;
    long long int Q;

    cin >> p >> q >> r >> L >> D;

    S = min(D, p*q*r);

    if(1./p + 1./q + 1./r > 1) {
         cout << 0;
         return 0;
    } else if(1./p + 1./q + 1./r == 1) {
        cout << floor((D - L + 1)/max(max(p,q),r));
    } else {
        for(long long i = L; i <= S; ++i) {
            if(ceil(i/p) + ceil(i/q) + ceil(i/r) <= i) {
                cout << i << " ";
                N++;
            }
        }
        Q = (long long)N + (long long)D - (long long)S;
        cout << endl << Q;
    }
    return 0;
}