// task name is

#include <bits/stdc++.h>

//#define ONLINE

using namespace std;

long long m, le, w, n, k;
vector<long long> l, nl;
vector<long long> r, nr;
long long h;

long long alM = 0;
long long alC = 0;


int main()
{
    #ifdef ONLINE
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    #endif // ONLINE
    cin>>m>>le>>w>>n>>k;
    alM += m;
    for (int i = 0;i< n; i++ ){
        cin>>h;
        r.push_back(h);
        alM += h;
        alC += h * (le + (2*i + 1) * w);
    }
    for (int i = 0;i< k; i++ ){
        cin>>h;
        l.push_back(h);
        alM += h;
        alC -= h * (le + (2*i + 1) * w);
    }
    nr = r;
    nl = l;
    long long cuM = alM;
    long long cuC = alC;
    bool f = true;
    long long re1 = 0;
    long long sn1 = 0;
    long long y = 0;
    while (l.size() + r.size() > 0 && y < 4){
        if (f){
            if (r.size() == 0){
                re1 ++;
                y++;
                f = 0;
                continue;
            }
            alM -= r[r.size() - 1];
            alC -= r[r.size() - 1] * (le + (2*r.size() - 1) * w);
            if (alM * le < -alC){
                re1++;
                y++;
                f = 0;
                alM += r[r.size() - 1];
                alC += r[r.size() - 1] * (le + (2*r.size() - 1) * w);
            }
            else {
                y = 0;
                r.pop_back();
                sn1++;
            }
        }
        else {
            if (l.size() == 0){
                re1 ++;
                y++;
                f = 1;
                continue;
            }
            alM -= l[l.size() - 1];
            alC += l[l.size() - 1] * (le + (2*l.size() - 1) * w);
            if (alM * le < alC){
                re1++;
                y++;
                f = 1;
                alM += l[l.size() - 1];
                alC -= l[l.size() - 1] * (le + (2*l.size() - 1) * w);
            }
            else {
                y = 0;
                l.pop_back();
                sn1++;
            }
        }
    }
    r = nr;
    l = nl;
    alM = cuM;
    alC = cuC;
    y = 0;
    f = false;
    long long re2 = 0;
    long long sn2 = 0;
    while (l.size() + r.size() > 0 && y < 4){
        if (f){
            if (r.size() == 0){
                re2 ++;
                y++;
                f = 0;
                continue;
            }
            alM -= r[r.size() - 1];
            alC -= r[r.size() - 1] * (le + (2*r.size() - 1) * w);
            if (alM * le < -alC){
                re2++;
                y++;
                f = 0;
                alM += r[r.size() - 1];
                alC += r[r.size() - 1] * (le + (2*r.size() - 1) * w);
            }
            else {
                y = 0;
                r.pop_back();
                sn2++;
            }
        }
        else {
            if (l.size() == 0){
                re2 ++;
                y++;
                f = 1;
                continue;
            }
            alM -= l[l.size() - 1];
            alC += l[l.size() - 1] * (le + (2*l.size() - 1) * w);
            if (alM * le < alC){
                re2++;
                y++;
                f = 1;
                alM += l[l.size() - 1];
                alC -= l[l.size() - 1] * (le + (2*l.size() - 1) * w);
            }
            else {
                y = 0;
                l.pop_back();
                sn2++;
            }
        }
    }
    if (sn1 > sn2){
        cout<<sn1<<" "<<re1;
    }
    else {
        if (sn2 > sn1){
            cout<<sn2<<" "<<re2;
        }
        else if (re1 < re2){
            cout<<sn1<<" "<<re1;
        }
        else {
            cout<<sn2<<" "<<re2;
        }
    }
    return 0;
}
