#include <bits/stdc++.h>
using namespace std;

long long basis;
const int MAX_N = 100001;
int left1[MAX_N];
long long pref_left_true[MAX_N];
long long pref_left_false[MAX_N];
int start_left = -1;
int right1[MAX_N];
long long pref_right_true[MAX_N];
long long pref_right_false[MAX_N];
int start_right = -1;

int m; // масса грифа
int l; // длина до рычага
int w; // ширина блина
int n; // блины слева
int k; // блины справа

inline void init(){
    #ifdef LOCAL
    ifstream cin("in.txt");
    #endif // LOCAL
    cin>>m>>l>>w>>n>>k;
    for(int i = n-1; i>-1; i--){
        cin>>left1[i];
    }
    for(int i = k-1; i>-1; i--){
        cin>>right1[i];
    }
    #ifdef LOCAL
    cin.close();
    #endif // LOCAL

    pref_left_true[0] = left1[0] * ((n-1) * 2 * w + w);
    for(int i=1; i<n; i++)
        pref_left_true[i] = pref_left_true[i-1] + left1[i] * ((n-i-1) * 2 * w + w);
    pref_right_true[0] = right1[0] * ((k-1) * 2 * w + w + 2*l);
    for(int i=1; i<k; i++)
        pref_right_true[i] = pref_right_true[i-1] + right1[i] * ((k-i-1) * 2 * w + w + 2*l);

    pref_left_false[0] = left1[0] * ((n-1) * 2 * w + w + 2*l);
    for(int i=1; i<n; i++)
        pref_left_false[i] = pref_left_false[i-1] + left1[i] * ((n-i-1) * 2 * w + w + 2*l);
    pref_right_false[0] = right1[0] * ((k-1) * 2 * w + w);
    for(int i=1; i<k; i++)
        pref_right_false[i] = pref_right_false[i-1] + right1[i] * ((k-i-1) * 2 * w + w);

    #ifdef LOCAL
    ofstream cout("test.txt");
    for(int i=0; i<n; i++)
        cout<<pref_left_true[i]<<' ';
    cout<<'\n';

    for(int i=0; i<k; i++)
        cout<<pref_right_true[i]<<' ';
    cout<<'\n';

    for(int i=0; i<n; i++)
        cout<<pref_left_false[i]<<' ';
    cout<<'\n';

    for(int i=0; i<k; i++)
        cout<<pref_right_false[i]<<' ';
    cout<<'\n';
    cout.close();
    #endif // LOCAL
}

inline void solve(int &shit, int &steps, bool &side){
    if (side){ // left
        long long moment_right = pref_right_false[k-1] - (start_right > -1 ? pref_right_false[start_right] : 0);
        moment_right -= basis;
        long long moment_left = pref_left_false[n-1];
        long long delta_moment = moment_left - moment_right;
        int new_start_left = lower_bound(pref_left_false, pref_left_false+n, delta_moment) - pref_left_false;
        if(pref_left_false[new_start_left] > delta_moment || new_start_left >= n)
            new_start_left--;
        if(new_start_left == start_left){
            return;
        }else{
            shit += new_start_left - start_left;
            start_left = new_start_left;
            steps++;
            side = !side;
            solve(shit, steps, side);
        }
    } else { //right
        long long moment_left = pref_left_true[n-1] - (start_left > -1 ? pref_left_true[start_left] : 0);
        moment_left -= basis;
        long long moment_right = pref_right_true[k-1];
        long long delta_moment = moment_right - moment_left;
        int new_start_right = lower_bound(pref_right_true, pref_right_true + k, delta_moment) - pref_right_true;
        if(pref_right_true[new_start_right] > delta_moment || new_start_right >= k)
            new_start_right--;
        if(new_start_right == start_right){
            return;
        } else {
            shit += new_start_right - start_right;
            start_right = new_start_right;
            steps++;
            side = !side;
            solve(shit, steps, side);
        }
    }
}

void l_bound_test(){
    int x[] = {0, 0, 1, 3, 3, 4};
    cout<<*upper_bound(x, x+6, -1);
}


int main(){
    init();
    basis = m*l;
    int shit1=0, steps1=0;
    int shit2=0, steps2=0;
    bool step = true;
    solve(shit1, steps1, step);
    start_left = -1;
    start_right = -1;
    step = false;
    solve(shit2, steps2, step);
    if(shit2 > shit1){
        shit1 = shit2;
        steps1 = steps2;
    }
    if(shit2 == shit1 && steps2 < steps1){
        steps1 = steps2;
    }
    #ifdef LOCAL
    ofstream cout("out.txt");
    #endif // LOCAL
    cout<<shit1<<' '<<steps1-1;
    #ifdef LOCAL
    cout.close();
    #endif // LOCAL

    return 0;
}
