#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <utility>

using namespace std;

#define ll long long
#define ld long double

ll l[101010];
ll r[101010];

int main()
{
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(0);

    ll m,L,w,n,k;
    cin>>m>>L>>w>>n>>k;

    ll Suml=0;
    ll Sumr=0;
    ll Sumwl=0;
    ll Sumwr=0;

    for(int i=0;i<n;i++)
    {
        cin>>l[i];
        Suml+=l[i]*2ll*L;
        Sumwl+=(2*i+1)*w*l[i];
    }

    for(int i=0;i<k;i++)
    {
        cin>>r[i];
        Sumr+=r[i]*2ll*L;
        Sumwr+=(2*i+1)*w*r[i];
    }

    ll ansdl=-1;
    ll ansdr=-1;
    ll anstl=0;
    ll anstr=0;
    ll nn=n;
    ll kk=k;


    while(true)
    {
        ll t=0;
        while(true)
        {
            if(n>0 && Sumwl-(2*n-1)*w*l[n-1]+Suml-l[n-1]*2ll*L+m*L>=Sumwr)
            {
                Sumwl-=(2*n-1)*w*l[n-1];
                Suml-=2ll*L*l[n-1];
                n--;
                t++;
            }
            else
            {
                break;
            }
        }
        if(t==0)
        {
            break;
        }
        else
        {
            anstl+=t;
            ansdl++;
            t=0;
        }
        while(true)
        {
            if(k>0 && Sumwl<=Sumwr-(2*k-1)*w*r[k-1]+Sumr-r[k-1]*2ll*L+m*L)
            {
                Sumwr-=(2*k-1)*w*r[k-1];
                Sumr-=2ll*L*r[k-1];
                k--;
                t++;
            }
            else
            {
                break;
            }
        }
        if(t==0)
        {
            break;
        }
        else
        {
            anstl+=t;
            ansdl++;
        }
    }


    n=nn;
    k=kk;

    Suml=0;
    Sumr=0;
    Sumwl=0;
    Sumwr=0;

    for(int i=0;i<n;i++)
    {
        Suml+=l[i]*2ll*L;
        Sumwl+=(2*i+1)*w*l[i];
    }

    for(int i=0;i<k;i++)
    {
        Sumr+=r[i]*2ll*L;
        Sumwr+=(2*i+1)*w*r[i];
    }


    while(true)
    {
        ll t=0;
        while(true)
        {
            if(k>0 && Sumwl<=Sumwr-(2*k-1)*w*r[k-1]+Sumr-r[k-1]*2ll*L+m*L)
            {
                Sumwr-=(2*k-1)*w*r[k-1];
                Sumr-=2ll*L*r[k-1];
                k--;
                t++;
            }
            else
            {
                break;
            }
        }
        if(t==0)
        {
            break;
        }
        else
        {
            anstr+=t;
            ansdr++;
            t=0;
        }
        while(true)
        {
            if(n>0 && Sumwl-(2*n-1)*w*l[n-1]+Suml-l[n-1]*2ll*L+m*L>=Sumwr)
            {
                Sumwl-=(2*n-1)*w*l[n-1];
                Suml-=2ll*L*l[n-1];
                n--;
                t++;
            }
            else
            {
                break;
            }
        }
        if(t==0)
        {
            break;
        }
        else
        {
            anstr+=t;
            ansdr++;
            t=0;
        }
    }

    if(anstl<anstr)
    {
        cout<<anstl<<' '<<ansdl<<endl;
        return 0;
    }

    if(anstl>anstr)
    {
        cout<<anstr<<' '<<ansdr<<endl;
        return 0;
    }

    cout<<anstl<<' '<<min(ansdl,ansdr)<<endl;

    return 0;
}
