#include<bits/stdc++.h>
using namespace std;
#define maxn 200009
long long  a[maxn] , b[maxn] , c[maxn] , d[maxn] ,e[maxn];
long long n , m , k;

long long  smalld(long long x)
{
    long long l = 1 , r=k , pos = 0;

    while(l<=r)
    {
        long long mid = (l + r)/2;

        if(d[mid]<=x)
        {
            pos = mid;
            l = mid+1;
        }
        else
        {
            r = mid-1;
        }
    }
    return pos;
}

int main()
{

    cin >> n >>  m >> k;

    long long  x , s , i , minb = 1e10;

    cin >> x >> s;

    //a[0] = x;

    for(i = 1 ; i<=m ; i++)
    {
        cin >> a[i];
    }
    for(i = 1 ; i<=m ; i++)
    {
        cin >> b[i];
        minb = min(minb , b[i]);
    }
    for(i = 1 ; i<=k ; i++)
    {
        cin >> c[i];
    }
    for(i = 1 ; i<=k ; i++)
    {
        cin >> d[i];
    }

    long long ans = 1LL*x*n;
    ans=min(ans,(n-c[smalld(s)])*x);

    for(int i = 1 ; i<=m ; i++)
    {
        if(s<b[i])
            continue;
        ans = min(ans , 1LL*(n-c[(smalld(s-b[i]))])*a[i]);
    }

    cout << ans;

}


#include<bits/stdc++.h>
using namespace std;
#define maxn 200009
long long  a[maxn] , b[maxn] , c[maxn] , d[maxn];
long long n , m , k;

long long  smalld(long long x)
{
    long long l = 1 , r=k , pos = 0;

    while(l<=r)
    {
        long long mid = (l + r)/2;

        if(d[mid]<=x)
        {
            pos = mid;
            l = mid+1;
        }
        else
        {
            r = mid-1;
        }
    }
    return pos;
}

int main()
{

    cin >> n >>  m >> k;

    long long  x , s , i;

    cin >> x >> s;

    a[0] = x;

    for(i = 1 ; i<=m ; i++)
    {
        cin >> a[i];
    }
    for(i = 1 ; i<=m ; i++)
    {
        cin >> b[i];
    }
    for(i = 1 ; i<=k ; i++)
    {
        cin >> c[i];
    }
    for(i = 1 ; i<=k ; i++)
    {
        cin >> d[i];
    }

    long long ans = 1LL*x*n;

    if(b[1]>s && d[1]>s)
    {
        cout << ans;
        return 0;
    }

    else if(d[1]>s)
    {
        for(i = 1 ; i<=m ; i++)
        {
            if(b[i]<s)
            {
                ans = min(ans , 1ll*a[i]*n);
            }
        }
        cout << ans;
        return 0;
    }

    for(int i = 1 ; i<=m ; i++)
    {
        if(s-b[i]<0)
            continue;
        ans = min(ans , 1LL*(n-c[(smalld(s-b[i]))])*a[i]);
    }

    cout << ans;

}


#include<bits/stdc++.h>
using namespace std;
#define maxn 100009
int  c[maxn] , d[maxn];

pair<int,int> p[maxn];

int main()
{
    int n , m , k;

    cin >> n >>  m >> k;

    int x , s;

    cin >> x >> s;

    for(int i = 1 ; i<=m ; i++)
    {
        cin >> p[i].second;
    }
    for(int i = 1 ; i<=m ; i++)
    {
        cin >> p[i].first;
    }
    for(int i = 1 ; i<=k ; i++)
    {
        cin >> c[i];
    }
    for(int i = 1 ; i<=k ; i++)
    {
        cin >> d[i];
    }

    sort(p+1 , p+m+1);

    long long ans = 1ll*n*x;

    if(p[1].first>s && d[1]>s)
    {
        cout << ans;
        return 0;
    }

    else if(d[1]>s)
    {
        for(int i = 1 ; i<=m ; i++)
        {
            if(p[i].first<s)
            {
                ans = min(ans , 1ll*p[i].second*n);
            }
            else
            {
                break;
            }
        }
        cout << ans;
        return 0;
    }

    int l = 1 , r = k;

    while(l<=r)
    {
        int mid = (l + r)/2;

        if(d[mid] <= s)
        {
            l = mid+1;
        }
        else
        {
            r = mid-1;
        }
    }

    if(r!=0)
    {
    if(d[r]==s && c[r]==n)
    {
        cout << "0";
        return 0;
    }
    else if(d[r]==s && c[r]<n)
    {
        r--;
    }

   // cout << l << " " << r << endl;
    long long remainpotion = n - c[r];
    long long remainpoints = s - d[r];

    ans = 1ll*remainpotion*x;

    for(int i = 1 ; i<=m ; i++)
    {
        if(p[i].first<remainpoints)
        {
            ans = min(ans , p[i].second*remainpotion);
           // cout << ans << endl;
        }
        else
        {
            break;
        }
    }
    cout << ans << endl;
    return 0;
    }
}


#include<bits/stdc++.h>
using namespace std;
#define maxn 200009
int  a[maxn] , b[maxn] , c[maxn] , d[maxn];
long long n , m , k;

long long  smalld(long long x)
{
    long long l = 1 , r=k , pos = 0;

    while(l<=r)
    {
        long long mid = (l + r)/2;

        if(d[mid]<=x)
        {
            pos = mid;
            l = mid+1;
        }
        else
        {
            r = mid-1;
        }
    }
    return pos;
}

int main()
{

    cin >> n >>  m >> k;

    long long  x , s;

    cin >> x >> s;

    for(int i = 1 ; i<=m ; i++)
    {
        cin >> a[i];
    }
    for(int i = 1 ; i<=m ; i++)
    {
        cin >> b[i];
    }
    for(int i = 1 ; i<=k ; i++)
    {
        cin >> c[i];
    }
    for(int i = 1 ; i<=k ; i++)
    {
        cin >> d[i];
    }

    long long ans = 1ll*x*n;

    for(int i = 1 ; i<=m ; i++)
    {
        if(s-b[i]>=0)
        ans = min(ans , 1ll*(n-c[(smalld(s-b[i]))])*a[i]);
    }

    cout << ans;

}


#include<bits/stdc++.h>
using namespace std;
#define maxn 200009
long long  a[maxn] , b[maxn] , c[maxn] , d[maxn] ,e[maxn];
long long n , m , k;

long long  smalld(long long x)
{
    long long l = 1 , r=k , pos = 0;

    while(l<=r)
    {
        long long mid = (l + r)/2;

        if(d[mid]<=x)
        {
            pos = mid;
            l = mid+1;
        }
        else
        {
            r = mid-1;
        }
    }
    return pos;
}

int main()
{

    cin >> n >>  m >> k;

    long long  x , s , i , minb = 1e10;

    cin >> x >> s;

    a[0] = x;

    for(i = 1 ; i<=m ; i++)
    {
        cin >> a[i];
    }
    for(i = 1 ; i<=m ; i++)
    {
        cin >> b[i];
        minb = min(minb , b[i]);
    }
    for(i = 1 ; i<=k ; i++)
    {
        cin >> c[i];
    }
    for(i = 1 ; i<=k ; i++)
    {
        cin >> d[i];
    }

    long long ans = 1LL*x*n;

    if(minb > s)
    {

        for(int i = 1 ; i<=k ; i++)
        {
            ans = min(ans , 1LL*(n - c[i])*x);
        }

        cout << ans ;
        return 0;

    }

    for(int i = 1 ; i<=m ; i++)
    {
        if(s-b[i]<0)
            continue;
        ans = min(ans , 1LL*(n-c[(smalld(s-b[i]))])*a[i]);
    }

    cout << ans;

}


#include<bits/stdc++.h>
using namespace std;
#define maxn 200009
long long  a[maxn] , b[maxn] , c[maxn] , d[maxn];
long long n , m , k;

long long  smalld(long long x)
{
    long long l = 1 , r=k , pos = 0;

    while(l<=r)
    {
        long long mid = (l + r)/2;

        if(d[mid]<=x)
        {
            pos = mid;
            l = mid+1;
        }
        else
        {
            r = mid-1;
        }
    }
    return pos;
}

int main()
{

    cin >> n >>  m >> k;

    long long  x , s;

    cin >> x >> s;

    for(int i = 1 ; i<=m ; i++)
    {
        cin >> a[i];
    }
    for(int i = 1 ; i<=m ; i++)
    {
        cin >> b[i];
    }
    for(int i = 1 ; i<=k ; i++)
    {
        cin >> c[i];
    }
    for(int i = 1 ; i<=k ; i++)
    {
        cin >> d[i];
    }

    long long ans = 1LL*x*n;

    for(int i = 1 ; i<=m ; i++)
    {
        if(b[i]<s)
        ans = min(ans , max(0LL , 1LL*(n-c[(smalld(s-b[i]))])*a[i]));
    }

    cout << ans;

}


#include<bits/stdc++.h>
using namespace std;
#define maxn 200009
int  a[maxn] , b[maxn] , c[maxn] , d[maxn];
long long n , m , k;

long long  smalld(long long x)
{
    long long l = 1 , r=k , pos = 0;

    while(l<=r)
    {
        long long mid = (l + r)/2;

        if(d[mid]<=x)
        {
            pos = mid;
            l = mid+1;
        }
        else
        {
            r = mid-1;
        }
    }
    return pos;
}

int main()
{

    cin >> n >>  m >> k;

    long long  x , s;

    cin >> x >> s;

    for(int i = 1 ; i<=m ; i++)
    {
        cin >> a[i];
    }
    for(int i = 1 ; i<=m ; i++)
    {
        cin >> b[i];
    }
    for(int i = 1 ; i<=k ; i++)
    {
        cin >> c[i];
    }
    for(int i = 1 ; i<=k ; i++)
    {
        cin >> d[i];
    }

    long long ans = 1LL*x*n;

    for(int i = 1 ; i<=m ; i++)
    {
        if(b[i]<s)
        ans = min(ans , max(0LL , 1LL*(n-c[(smalld(s-b[i]))])*a[i]));
    }

    cout << ans;

}


#include <bits/stdc++.h>
#define MAX_MK 100005

using namespace std;

typedef long long ll;

ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, k, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k >> x >> s;
    for(i = 0; i < m; i ++)
    {
        cin >> M[i];
    }
    for(i = 0; i < m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 0; i < k; i ++)
    {
        cin >> K[i];
    }
    for(i = 0; i < k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i < m; i ++)
    {
        if(s - Mp[i] >= 0)
        {
            l = upper_bound(Kp, Kp + k, s - Mp[i]) - Kp - 1;
            if(l >= 0)
            {
                if(best > (n - K[l]) * M[i])
                {
                    best = (n - K[l]) * M[i];
                }
            }
        }
    }
    cout << best << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define MAX_MK 100005

using namespace std;

typedef long long ll;

ll k;
ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

ll find(int l, int r, ll val)
{
    int h;
    while(l < r)
    {
        h = (l + r + 1) / 2;
        if(Kp[h] > val) r = h - 1;
        else l = h;
    }
    return K[l];
}

ll max_complete(ll money_left)
{
	ll l = 0, r = k;
	while (l < r)
	{
		ll m = (l + r + 1) / 2;
		if (Kp[m] <= money_left) l = m; else r = m-1;
	}
	return K[l];
}

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k >> x >> s;
    M[0] = x;
    Mp[0] = K[0] = Kp[0] = 0;
    for(i = 1; i <= m; i ++)
    {
        cin >> M[i];
    }
    for(i = 1; i <= m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> K[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i <= m; i ++)
    {
        if(s >= Mp[i])
        {
            l = max_complete(s - Mp[i]);
            tmp = (n - l) * M[i];
            if(best > tmp) best = tmp;
        }
    }
    cout << best << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define MAX_MK 100005

using namespace std;

typedef long long ll;

ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

ll find(int l, int r, ll val)
{
    int h;
    while(l < r)
    {
        h = (l + r + 1) / 2;
        if(Kp[h] > val) r = h - 1;
        else l = h;
    }
    return K[l];
}

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, k, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k >> x >> s;
    M[0] = x;
    Mp[0] = K[0] = Kp[0] = 0;
    for(i = 1; i <= m; i ++)
    {
        cin >> M[i];
    }
    for(i = 1; i <= m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> K[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i <= m; i ++)
    {
        if(s >= Mp[i])
        {
            l = find(0, k, s - Mp[i]);
            tmp = (n - l) * M[i];
            if(best > tmp) best = tmp;
        }
    }
    cout << best << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define MAX_MK 100005

using namespace std;

typedef long long ll;

ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, k, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k >> x >> s;
    M[0] = x;
    Mp[0] = K[0] = Kp[0] = 0;
    for(i = 1; i <= m; i ++)
    {
        cin >> M[i];
    }
    for(i = 1; i <= m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> K[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i <= m; i ++)
    {
        if(s >= Mp[i])
        {
            l = upper_bound(Kp, Kp + k + 1, s - Mp[i]) - Kp - 1;
            tmp = (max(n - K[l], 0LL) * M[i]);
            if(best > tmp) best = tmp;
        }
    }
    cout << best << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define MAX_MK 100005

using namespace std;

typedef long long ll;

ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, k, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k >> x >> s;
    for(i = 0; i < m; i ++)
    {
        cin >> M[i];
    }
    for(i = 0; i < m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 0; i < k; i ++)
    {
        cin >> K[i];
    }
    for(i = 0; i < k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i < m; i ++)
    {
        l = upper_bound(Kp, Kp + k, s - Mp[i]) - Kp - 1;
        if(l >= 0)
        {
            if(best > (n - K[l]) * M[i])
            {
                best = (n - K[l]) * M[i];
            }
        }
    }
    cout << best << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define MAX_MK 100005

using namespace std;

typedef long long ll;

ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, k, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k >> x >> s;
    for(i = 0; i < m; i ++)
    {
        cin >> M[i];
    }
    for(i = 0; i < m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 0; i < k; i ++)
    {
        cin >> K[i];
    }
    for(i = 0; i < k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i < m; i ++)
    {
        if(Mp[i] <= s && best > M[i] * n)
        {
            best = M[i] * n;
        }
    }
    for(i = 0; i < m; i ++)
    {
        if(s - Mp[i] >= 0)
        {
            l = upper_bound(Kp, Kp + k, s - Mp[i]) - Kp - 1;
            if(l >= 0)
            {
                if(best > (n - K[l]) * M[i])
                {
                    best = (n - K[l]) * M[i];
                }
            }
        }
    }
    cout << best << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define MAX_MK 100005

using namespace std;

typedef long long ll;

ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, k, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k >> x >> s;
    for(i = 0; i < m; i ++)
    {
        cin >> M[i];
    }
    for(i = 0; i < m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 0; i < k; i ++)
    {
        cin >> K[i];
    }
    for(i = 0; i < k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i < m; i ++)
    {
        if(s >= Mp[i] && best > n * M[i])
        {
            best = n * M[i];
        }
    }
    for(i = 0; i < k; i ++)
    {
        if(s >= Kp[i] && n <= K[i])
        {
            best = 0;
            break;
        }
    }
    for(i = 0; i < m; i ++)
    {
        if(s >= Mp[i])
        {
            l = upper_bound(Kp, Kp + k, s - Mp[i]) - Kp;
            l --;
            while(l >= 0)
            {
                if(best > (n - K[l]) * M[i])
                {
                    best = (n - K[l]) * M[i];
                }
                l --;
            }
        }
    }
    cout << best << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define MAX_MK 100005

using namespace std;

typedef long long ll;

ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, k, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k >> x >> s;
    for(i = 0; i < m; i ++)
    {
        cin >> M[i];
    }
    for(i = 0; i < m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 0; i < k; i ++)
    {
        cin >> K[i];
    }
    for(i = 0; i < k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i < m; i ++)
    {
        if(s >= Mp[i] && best > n * M[i])
        {
            best = n * M[i];
        }
    }
    for(i = 0; i < k; i ++)
    {
        if(s >= Kp[i])
        {
            tmp = max(n - K[i], 0LL);
            if(best > tmp * x) best = tmp * x;
            break;
        }
    }
    for(i = 0; i < m; i ++)
    {
        if(s >= Mp[i])
        {
            l = upper_bound(Kp, Kp + k, s - Mp[i]) - Kp;
            l --;
            while(l >= 0)
            {
                tmp = max((n - K[l]), 0LL);
                if(best > tmp * M[i])
                {
                    best = tmp * M[i];
                }
                l --;
            }
        }
    }
    cout << best << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define MAX_MK 100005

using namespace std;

typedef long long ll;

ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, k, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k >> x >> s;
    M[0] = x;
    Mp[0] = K[0] = Kp[0] = 0;
    for(i = 1; i <= m; i ++)
    {
        cin >> M[i];
    }
    for(i = 1; i <= m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> K[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i <= m; i ++)
    {
        if(s >= Mp[i])
        {
            l = upper_bound(Kp, Kp + k + 1, s - Mp[i]) - Kp;
            l --;
            tmp = (max(n - K[l], 0LL) * M[i]);
            if(best > tmp) best = tmp;
        }
    }
    cout << best << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define MAX_MK 100005

using namespace std;

typedef long long ll;

ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, k, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k >> x >> s;
    M[0] = x;
    Mp[0] = K[0] = Kp[0] = 0;
    for(i = 1; i <= m; i ++)
    {
        cin >> M[i];
    }
    for(i = 1; i <= m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> K[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i <= m; i ++)
    {
        if(s >= Mp[i])
        {
            l = upper_bound(Kp, Kp + k + 1, s - Mp[i]) - Kp;
            l --;
            tmp = (n - K[l]) * M[i];
            if(best > tmp) best = tmp;
        }
    }
    cout << best << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define MAX_MK 200005

using namespace std;

typedef long long ll;

ll k;
ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

ll find(int l, int r, ll val)
{
    int h;
    while(l < r)
    {
        h = (l + r + 1) / 2;
        if(Kp[h] > val) r = h - 1;
        else l = h;
    }
    return K[l];
}

ll max_complete(ll money_left)
{
	ll l = 0, r = k;
	while (l < r)
	{
		ll m = (l + r + 1) / 2;
		if (Kp[m] <= money_left) l = m; else r = m-1;
	}
	return K[l];
}

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k;
    cin >> x >> s;
    M[0] = x;
    Mp[0] = K[0] = Kp[0] = 0;
    for(i = 1; i <= m; i ++)
    {
        cin >> M[i];
    }
    for(i = 1; i <= m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> K[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i <= m; i ++)
    {
        if(s >= Mp[i])
        {
            l = max_complete(s - Mp[i]);
            tmp = (n - l) * M[i];
            if(best > tmp) best = tmp;
        }
    }
    cout << best << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define MAX_MK 200005

using namespace std;

typedef long long ll;

ll M[MAX_MK], Mp[MAX_MK], K[MAX_MK], Kp[MAX_MK];

int main()
{
    //freopen("i.txt", "r", stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, k, x, s, i, best, j, l, tmp;
    cin >> n >> m >> k >> x >> s;
    M[0] = x;
    Mp[0] = K[0] = Kp[0] = 0;
    for(i = 1; i <= m; i ++)
    {
        cin >> M[i];
    }
    for(i = 1; i <= m; i ++)
    {
        cin >> Mp[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> K[i];
    }
    for(i = 1; i <= k; i ++)
    {
        cin >> Kp[i];
    }
    best = x * n;
    for(i = 0; i <= m; i ++)
    {
        if(s >= Mp[i])
        {
            l = upper_bound(Kp, Kp + k + 1, s - Mp[i]) - Kp - 1;
            tmp = (n - K[l]) * M[i];
            if(best > tmp) best = tmp;
        }
    }
    cout << best << "\n";
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

ll BS(vector<pair<ll,ll>> arr,ll ser){
    ll start=0,end=arr.size()-1;

    ll ans=-1;
    while(start<=end){
        ll mid=(start+end)/2;
        if(arr[mid].first==ser){
            ans=mid;
            if(arr[mid+1].first==ser){
                start=mid+1;
            }
            else break;
        }
        else if(arr[mid].first>ser){
            end=mid-1;
        }
        else if(arr[mid].first<ser){
            ans=mid;
            start=mid+1;
        }
    }

    return ans;
}

int main(){
    fast
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m+1);
    type_o[0].first=0;
    type_o[0].second=x;

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].second;
    }

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].first;
    }

    vector<pair<ll,ll>> type_t(k+1);
    type_t[0].first=0;
    type_t[0].second=0;

    for(ll i=1;i<=k;++i){
        cin>>type_t[i].second;
    }

    for(ll i=1;i<=k;++i){
        cin>>type_t[i].first;
    }

    ll temp,rem;
    ll ans=x*n;
    for(ll i=0;i<=m;++i){
        ll ser=s-type_o[i].first;

        ll ind=BS(type_t,ser);

        if(ind!=-1) rem=n-type_t[ind].second;
        else rem=n;

        // cout<<ser<<" "<<ind<<" "<<rem<<endl;
        temp=type_o[i].second*rem;
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

ll BS(vector<pair<ll,ll>> arr,ll ser){
    ll start=0,end=arr.size()-1;

    ll ans=-1;
    while(start<=end){
        ll mid=(start+end)/2;
        if(arr[mid].first==mid){
            ans=mid;
            break;
        }
        else if(arr[mid].first>ser){
            end=mid-1;
        }
        else if(arr[mid].first<ser){
            ans=mid;
            start=mid+1;
        }
    }

    return ans;
}

int main(){
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m);
    for(ll i=0;i<m;++i){
        cin>>type_o[i].second;
    }
    for(ll i=0;i<m;++i){
        cin>>type_o[i].first;
    }

    sort(type_o.begin(),type_o.end());

    ll mini=INT_MAX;
    for(ll i=0;i<m;++i){
        if(type_o[i].second<mini) mini=type_o[i].second;
        else type_o[i].second=mini;
    }

    vector<pair<ll,ll>> type_t(k);
    for(ll i=0;i<k;++i){
        cin>>type_t[i].second;
    }
    for(ll i=0;i<k;++i){
        cin>>type_t[i].first;
    }

    sort(type_t.begin(),type_t.end());

    ll maxi=INT_MIN;
    for(ll i=0;i<k;++i){
        if(type_t[i].second>maxi) maxi=type_t[i].second;
        else type_t[i].second=maxi;
    }

    // for(ll i=0;i<m;++i){
    //     cout<<type_o[i].first<<" ";
    // }
    // cout<<endl;
    //  for(ll i=0;i<m;++i){
    //     cout<<type_o[i].second<<" ";
    // }
    // cout<<endl;
    // for(ll i=0;i<k;++i){
    //     cout<<type_t[i].first<<" ";
    // }
    // cout<<endl;
    // for(ll i=0;i<k;++i){
    //     cout<<type_t[i].second<<" ";
    // }
    // cout<<endl;

    ll temp;
    ll ans=x*n;
    for(ll i=0;i<k;++i){
        if(type_t[i].first>s) break;
        ll ser=s-type_t[i].first;
        ll rem=n-type_t[i].second;

        ll ind=BS(type_o,ser);

        if(ind!=-1) temp=rem*type_o[ind].second;
        else temp=rem*x;
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

ll BS(vector<pair<ll,ll>> arr,ll ser){
    ll start=0,end=arr.size()-1;

    ll ans=-1;
    while(start<=end){
        ll mid=(start+end)/2;
        if(arr[mid].first==ser){
            ans=mid;
            if(arr[mid+1].first==ser){
                start=mid+1;
            }
            else break;
        }
        else if(arr[mid].first>ser){
            end=mid-1;
        }
        else if(arr[mid].first<ser){
            ans=mid;
            start=mid+1;
        }
    }

    return ans;
}

int main(){
    fast
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m+1);
    type_o[0].first=0;
    type_o[0].second=x;

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].second;
    }

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].first;
    }

    vector<pair<ll,ll>> type_t(k+1);
    type_t[0].first=0;
    type_t[0].second=0;

    for(ll i=1;i<=k;++i){
        cin>>type_t[i].second;
    }

    for(ll i=1;i<=k;++i){
        cin>>type_t[i].first;
    }

    ll temp,rem;
    ll ans=x*n;
    for(ll i=0;i<=m;++i){
        ll ser=s-type_o[i].first;

        ll ind=BS(type_t,ser);

        if(ind!=-1) rem=n-type_t[ind].second;
        else rem=n;

        // cout<<ser<<" "<<ind<<" "<<rem<<endl;
        if(type_o[i].first<=s) temp=type_o[i].second*rem;
        else temp=x*rem;

        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

int main(){
    fast
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m+1);
    type_o[0].first=0;
    type_o[0].second=x;

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].second;
    }

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].first;
    }

    vector<pair<ll,ll>> type_two(k+1);
    type_two[0].first=0;
    type_two[0].second=0;

    for(ll i=1;i<=k;++i){
        cin>>type_two[i].second;
    }

    for(ll i=1;i<=k;++i){
        cin>>type_two[i].first;
    }

    ll temp=ll_MAX,rem;
    ll ans=x*n;
    for(ll i=0;i<=m;++i){
        ll ser=s-type_o[i].first;

        if(ser>=0){
            temp=n*type_o[i].second;

            ll start=0,end=k;
            ll ans=-1;
            while(start<=end){
                // cout<<start<<" "<<end<<endl;
                ll mid=(start+end)/2;
                if(type_two[mid].first==ser){
                    ans=mid;
                    break;
                }
                else if(type_two[mid].first>ser){
                    end=mid-1;
                }
                else if(type_two[mid].first<ser){
                    ans=mid;
                    start=mid+1;
                }
            }

            if(ans!=-1) temp-=type_two[ans].second*type_o[i].second;
        }
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

ll BS(vector<pair<ll,ll>> arr,ll ser){
    ll start=0,end=arr.size()-1;

    ll ans=-1;
    while(start<=end){
        ll mid=(start+end)/2;
        if(arr[mid].first==mid){
            ans=mid;
            break;
        }
        else if(arr[mid].first>ser){
            end=mid-1;
        }
        else if(arr[mid].first<ser){
            ans=mid;
            start=mid+1;
        }
    }

    return ans;
}

int main(){
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m);
    for(ll i=0;i<m;++i){
        cin>>type_o[i].second;
    }
    for(ll i=0;i<m;++i){
        cin>>type_o[i].first;
    }

    sort(type_o.begin(),type_o.end());

    ll mini=INT_MAX;
    for(ll i=0;i<m;++i){
        if(type_o[i].second<mini) mini=type_o[i].second;
        else type_o[i].second=mini;
    }

    vector<pair<ll,ll>> type_t(k+1);
    type_t[0].first=0,type_t[0].second=0;
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].second;
    }
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].first;
    }

    sort(type_t.begin(),type_t.end());

    ll maxi=INT_MIN;
    for(ll i=0;i<=k;++i){
        if(type_t[i].second>maxi) maxi=type_t[i].second;
        else type_t[i].second=maxi;
    }

    // for(ll i=0;i<m;++i){
    //     cout<<type_o[i].first<<" ";
    // }
    // cout<<endl;
    //  for(ll i=0;i<m;++i){
    //     cout<<type_o[i].second<<" ";
    // }
    // cout<<endl;
    // for(ll i=0;i<=k;++i){
    //     cout<<type_t[i].first<<" ";
    // }
    // cout<<endl;
    // for(ll i=0;i<=k;++i){
    //     cout<<type_t[i].second<<" ";
    // }
    // cout<<endl;

    ll temp;
    ll ans=x*n;
    for(ll i=0;i<k;++i){
        if(type_t[i].first>s) break;
        ll ser=s-type_t[i].first;
        ll rem=n-type_t[i].second;

        ll ind=BS(type_o,ser);
        // cout<<ser<<" "<<rem<<" "<<ind<<endl;
        if(ind!=-1) temp=rem*type_o[ind].second;
        else temp=rem*x;
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

ll BS(vector<pair<ll,ll>> arr,ll ser){
    ll start=0,end=arr.size()-1;

    ll ans=-1;
    while(start<=end){
        ll mid=(start+end)/2;
        if(arr[mid].first==ser){
            ans=mid;
            if(arr[mid+1].first==ser){
                start=mid+1;
            }
            else break;
        }
        else if(arr[mid].first>ser){
            end=mid-1;
        }
        else if(arr[mid].first<ser){
            ans=mid;
            start=mid+1;
        }
    }

    return ans;
}

int main(){
    fast
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m+1);
    type_o[0].first=0;
    type_o[0].second=x;
    for(ll i=1;i<=m;++i){
        cin>>type_o[i].second;
    }
    for(ll i=1;i<=m;++i){
        cin>>type_o[i].first;
    }

    vector<pair<ll,ll>> type_t(k+1);
    type_t[0].first=0,type_t[0].second=0;
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].second;
    }
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].first;
    }

    ll temp,rem;
    ll ans=x*n;
    for(ll i=0;i<=m;++i){
        if(type_o[i].first>s) break;
        ll ser=s-type_o[i].first;

        ll ind=BS(type_t,ser);

        if(ind!=-1) rem=n-type_t[ind].second;
        else rem=n;

        // cout<<ser<<" "<<ind<<" "<<rem<<endl;
        temp=type_o[i].second*rem;
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

ll BS(vector<pair<ll,ll>> arr,ll ser){
    ll start=0,end=arr.size()-1;
    ll ans=-1;
    while(start<=end){
        // cout<<start<<" "<<end<<endl;
        ll mid=(start+end)/2;
        if(arr[mid].first==ser){
            ans=mid;
            break;
        }
        else if(arr[mid].first>ser){
            end=mid-1;
        }
        else if(arr[mid].first<ser){
            ans=mid;
            start=mid+1;
        }
    }

    return ans;
}

int main(){
    fast
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m+1);
    type_o[0].first=0;
    type_o[0].second=x;

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].second;
    }

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].first;
    }

    vector<pair<ll,ll>> type_two(k+1);
    type_two[0].first=0;
    type_two[0].second=0;

    for(ll i=1;i<=k;++i){
        cin>>type_two[i].second;
    }

    for(ll i=1;i<=k;++i){
        cin>>type_two[i].first;
    }

    ll temp=ll_MAX,rem;
    ll ans=x*n;
    for(ll i=0;i<=m;++i){
        ll ser=s-type_o[i].first;

        if(ser>=0){
            temp=n*type_o[i].second;

            ll start=0,end=k;
            ll ans=-1;
            while(start<=end){
                // cout<<start<<" "<<end<<endl;
                ll mid=(start+end)/2;
                if(type_two[mid].first<=ser){
                    ans=mid;
                    start=mid+1;
                }
                else{
                    end=mid-1;
                }
            }

            if(ans!=-1) temp-=type_two[ans].second*type_o[i].second;
        }
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

int main(){
    fast
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m+1);
    type_o[0].first=0;
    type_o[0].second=x;

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].second;
    }

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].first;
    }

    vector<pair<ll,ll>> type_two(k+1);
    type_two[0].first=0;
    type_two[0].second=0;

    for(ll i=1;i<=k;++i){
        cin>>type_two[i].second;
    }

    for(ll i=1;i<=k;++i){
        cin>>type_two[i].first;
    }

    ll temp=ll_MAX,rem;
    ll ans=x*n;
    for(ll i=0;i<=m;++i){
        ll ser=s-type_o[i].first;

        if(ser>=0){
            temp=n*type_o[i].second;

            ll start=0,end=k;
            ll ans=-1;
            while(start<=end){
                // cout<<start<<" "<<end<<endl;
                ll mid=(start+end)/2;
                if(type_two[mid].first==ser){
                    ans=mid;
                    start=mid+1;
                }
                else if(type_two[mid].first>ser){
                    end=mid-1;
                }
                else if(type_two[mid].first<ser){
                    ans=mid;
                    start=mid+1;
                }
            }

            if(ans!=-1) temp-=type_two[ans].second*type_o[i].second;
        }
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

ll BS(vector<pair<ll,ll>> arr,ll ser){
    ll start=0,end=arr.size()-1;
    // cout<<start<<" "<<end<<endl;
    ll ans=-1;
    while(start<=end){
        ll mid=(start+end)/2;
        if(arr[mid].first==ser){
            ans=mid;
            break;
        }
        else if(arr[mid].first>ser){
            end=mid-1;
        }
        else if(arr[mid].first<ser){
            ans=mid;
            start=mid+1;
        }
    }

    return ans;
}

int main(){
    fast
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m+1);
    type_o[0].first=0;
    type_o[0].second=x;

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].second;
    }

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].first;
    }

    vector<pair<ll,ll>> type_two(k+1);
    type_two[0].first=0;
    type_two[0].second=0;

    for(ll i=1;i<=k;++i){
        cin>>type_two[i].second;
    }

    for(ll i=1;i<=k;++i){
        cin>>type_two[i].first;
    }

    ll temp,rem;
    ll ans=x*n;
    for(ll i=0;i<=m;++i){
        ll ser=s-type_o[i].first;

        ll ind=BS(type_two,ser);

        if(ind!=-1) rem=n-type_two[ind].second;
        else rem=n;

        // cout<<ser<<" "<<ind<<" "<<rem<<endl;
        if(type_o[i].first<=s) temp=type_o[i].second*rem;
        else temp=x*rem;
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

ll BS(vector<pair<ll,ll>> arr,ll ser){
    ll start=0,end=arr.size()-1;

    ll ans=-1;
    while(start<=end){
        ll mid=(start+end)/2;
        if(arr[mid].first==mid){
            ans=mid;
            break;
        }
        else if(arr[mid].first>ser){
            end=mid-1;
        }
        else if(arr[mid].first<ser){
            ans=mid;
            start=mid+1;
        }
    }

    return ans;
}

int main(){
    fast
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m);
    for(ll i=0;i<m;++i){
        cin>>type_o[i].second;
    }
    for(ll i=0;i<m;++i){
        cin>>type_o[i].first;
    }

    sort(type_o.begin(),type_o.end());

    ll mini=INT_MAX;
    for(ll i=0;i<m;++i){
        if(type_o[i].second<mini) mini=type_o[i].second;
        else type_o[i].second=mini;
    }

    vector<pair<ll,ll>> type_t(k+1);
    type_t[0].first=0,type_t[0].second=0;
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].second;
    }
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].first;
    }

    ll temp;
    ll ans=x*n;
    for(ll i=0;i<=k;++i){
        if(type_t[i].first>s) break;
        ll ser=s-type_t[i].first;
        ll rem=n-type_t[i].second;

        ll ind=BS(type_o,ser);

        if(ind!=-1) temp=rem*type_o[ind].second;
        else temp=rem*x;
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

int main(){
    fast
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m+1);
    type_o[0].first=0;
    type_o[0].second=x;

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].second;
    }

    for(ll i=1;i<=m;++i){
        cin>>type_o[i].first;
    }

    vector<pair<ll,ll>> type_two(k+1);
    type_two[0].first=0;
    type_two[0].second=0;

    for(ll i=1;i<=k;++i){
        cin>>type_two[i].second;
    }

    for(ll i=1;i<=k;++i){
        cin>>type_two[i].first;
    }

    ll temp,rem;
    ll ans=x*n;
    for(ll i=0;i<=m;++i){
        ll ser=s-type_o[i].first;

        ll start=0,end=type_two.size()-1;

        ll ind=-1;
        while(start<=end){
            ll mid=(start+end)/2;
            if(type_two[mid].first==ser){
                ind=mid;
                if(type_two[mid+1].first==ser){
                    start=mid+1;
                }
                else break;
            }
            else if(type_two[mid].first>ser){
                end=mid-1;
            }
            else if(type_two[mid].first<ser){
                ind=mid;
                start=mid+1;
            }
        }

        if(ind!=-1) rem=n-type_two[ind].second;
        else rem=n;

        // cout<<ser<<" "<<ind<<" "<<rem<<endl;
        if(type_o[i].first<=s) temp=type_o[i].second*rem;
        else temp=x*rem;

        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

ll BS(vector<pair<ll,ll>> arr,ll ser){
    ll start=0,end=arr.size()-1;

    ll ans=-1;
    while(start<=end){
        ll mid=(start+end)/2;
        if(arr[mid].first==ser){
            ans=mid;
            break;
        }
        else if(arr[mid].first>ser){
            end=mid-1;
        }
        else if(arr[mid].first<ser){
            ans=mid;
            start=mid+1;
        }
    }

    return ans;
}

int main(){
    fast
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m+1);
    type_o[0].first=0;
    type_o[0].second=x;
    for(ll i=1;i<=m;++i){
        cin>>type_o[i].second;
    }
    for(ll i=1;i<=m;++i){
        cin>>type_o[i].first;
    }

    vector<pair<ll,ll>> type_t(k+1);
    type_t[0].first=0,type_t[0].second=0;
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].second;
    }
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].first;
    }

    ll temp,rem;
    ll ans=x*n;
    for(ll i=0;i<=m;++i){
        if(type_o[i].first>s) break;
        ll ser=s-type_o[i].first;

        ll ind=BS(type_t,ser);

        if(ind!=-1) rem=n-type_t[ind].second;
        else rem=n;

        // cout<<ser<<" "<<ind<<" "<<rem<<endl;
        temp=type_o[i].second*rem;
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

ll BS(vector<pair<ll,ll>> arr,ll ser){
    ll start=0,end=arr.size()-1;

    ll ans=-1;
    while(start<=end){
        ll mid=(start+end)/2;
        if(arr[mid].first==mid){
            ans=mid;
            break;
        }
        else if(arr[mid].first>ser){
            end=mid-1;
        }
        else if(arr[mid].first<ser){
            ans=mid;
            start=mid+1;
        }
    }

    return ans;
}

int main(){
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m);
    for(ll i=0;i<m;++i){
        cin>>type_o[i].second;
    }
    for(ll i=0;i<m;++i){
        cin>>type_o[i].first;
    }

    sort(type_o.begin(),type_o.end());

    ll mini=INT_MAX;
    for(ll i=0;i<m;++i){
        if(type_o[i].second<mini) mini=type_o[i].second;
        else type_o[i].second=mini;
    }

    vector<pair<ll,ll>> type_t(k+1);
    type_t[0].first=0,type_t[0].second=0;
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].second;
    }
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].first;
    }

    sort(type_t.begin(),type_t.end());

    ll maxi=INT_MIN;
    for(ll i=0;i<=k;++i){
        if(type_t[i].second>maxi) maxi=type_t[i].second;
        else type_t[i].second=maxi;
    }

    // for(ll i=0;i<m;++i){
    //     cout<<type_o[i].first<<" ";
    // }
    // cout<<endl;
    //  for(ll i=0;i<m;++i){
    //     cout<<type_o[i].second<<" ";
    // }
    // cout<<endl;
    // for(ll i=0;i<=k;++i){
    //     cout<<type_t[i].first<<" ";
    // }
    // cout<<endl;
    // for(ll i=0;i<=k;++i){
    //     cout<<type_t[i].second<<" ";
    // }
    // cout<<endl;

    ll temp;
    ll ans=x*n;
    for(ll i=0;i<=k;++i){
        if(type_t[i].first>s) break;
        ll ser=s-type_t[i].first;
        ll rem=n-type_t[i].second;

        ll ind=BS(type_o,ser);
        // cout<<ser<<" "<<rem<<" "<<ind<<endl;
        if(ind!=-1) temp=rem*type_o[ind].second;
        else temp=rem*x;
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


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

#define ll long long int
#define debug cout<<"debug";
#define mp make_pair
#define pb push_back
#define fast  ios_base::sync_with_stdio(false);cin.tie(0);
#define MOD 1000000007
#define ll_MAX 1000000000000000
#define endl "\n"
ll fast_expo(ll x,ll p){if(p==0) return 1;
else if(p%2==0){ ll t=fast_expo(x,p/2)%MOD;return (t*t)%MOD;} else return (x*(fast_expo(x,p-1))%MOD)%MOD;}

ll BS(vector<pair<ll,ll>> arr,ll ser){
    ll start=0,end=arr.size()-1;

    ll ans=-1;
    while(start<=end){
        ll mid=(start+end)/2;
        if(arr[mid].first==ser){
            ans=mid;
            break;
        }
        else if(arr[mid].first>ser){
            end=mid-1;
        }
        else if(arr[mid].first<ser){
            ans=mid;
            start=mid+1;
        }
    }

    return ans;
}

int main(){
    fast
    ll n,m,k;cin>>n>>m>>k;
    ll x,s;cin>>x>>s;

    vector<pair<ll,ll>> type_o(m);
    for(ll i=0;i<m;++i){
        cin>>type_o[i].second;
    }
    for(ll i=0;i<m;++i){
        cin>>type_o[i].first;
    }

    sort(type_o.begin(),type_o.end());

    ll mini=INT_MAX;
    for(ll i=0;i<m;++i){
        if(type_o[i].second<mini) mini=type_o[i].second;
        else type_o[i].second=mini;
    }

    vector<pair<ll,ll>> type_t(k+1);
    type_t[0].first=0,type_t[0].second=0;
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].second;
    }
    for(ll i=1;i<=k;++i){
        cin>>type_t[i].first;
    }

    ll temp;
    ll ans=x*n;
    for(ll i=0;i<=k;++i){
        if(type_t[i].first>s) break;
        ll ser=s-type_t[i].first;
        ll rem=n-type_t[i].second;

        ll ind=BS(type_o,ser);

        if(ind!=-1) temp=rem*type_o[ind].second;
        else temp=rem*x;
        if(temp<ans) ans=temp;
    }

    cout<<ans;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
	freopen("in", "r", stdin);
	//freopen("out", "w", stdout);
#endif
	int n, m, k,x,s;
	cin >> n >> m >> k;
	cin>>x>>s;
	int a[m], b[m],c[k],d[k];
	for (int i = 0; i < m; ++i) {
		scanf("%d", &a[i]);
	}
	for (int i = 0; i < m; ++i) {
		scanf("%d", &b[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%d", &c[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%d", &d[i]);
	}
	long long ans=n*x;
	int f;
	for (int i = 0; i < m; ++i) {
		if(b[i]>s){
			break;
		}
		ans=min(ans,1ll*n*a[i]);
		for (int j = 0; j < k; ++j) {
			if(b[i]+d[j]>s){
				break;
			}
			f=n-c[j];
			if(f<=0){
				ans=0;
				cout<<0;
				return 0;
			}
			ans=min(ans,1ll*f*a[i]);
		}
	}
	cout<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
	freopen("in", "r", stdin);
	//freopen("out", "w", stdout);
#endif
	long long n, m, k, x, s;
	cin >> n >> m >> k;
	cin >> x >> s;
	long long a[m], b[m], c[k], d[k];
	for (int i = 0; i < m; ++i) {
		scanf("%lld", &a[i]);
	}
	for (int i = 0; i < m; ++i) {
		scanf("%lld", &b[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%lld", &c[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%lld", &d[i]);
	}
	long long ans = n * x;
	int f;
	for (int i = 0; i < k; ++i) {
		if (d[i] > s) {
			break;
		}
		f = n - c[i];
		if (f <= 0) {
			cout << 0;
			return 0;
		}
	}
	for (int i = 0; i < m; ++i) {
		if (b[i] > s) {
			continue;
		}
		ans = min(ans, 1ll * n * a[i]);
		int l=upper_bound(d, d+k,s-b[i])-d-1;
		if(l!=-1){
			f = n - c[l];
			ans=min(ans,1ll*f*a[i]);
		}
	}
	cout << ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
	freopen("in", "r", stdin);
	//freopen("out", "w", stdout);
#endif
	int n, m, k, x, s;
	cin >> n >> m >> k;
	cin >> x >> s;
	int  a[m], b[m + 1], c[k + 1], d[k + 1];
	for (int i = 1; i <= m; ++i) {
		scanf("%lld", &a[i]);
	}
	for (int i = 1; i <= m; ++i) {
		scanf("%lld", &b[i]);
	}
	for (int i = 1; i <= k; ++i) {
		scanf("%lld", &c[i]);
	}
	for (int i = 1; i <= k; ++i) {
		scanf("%lld", &d[i]);
	}
	a[0] = x;
	b[0] = c[0] = d[0] = 0;
	long long ans = x*n;
	int f;
	for (int i = 0; i <= m; ++i) {
		if (b[i] > s) {
			continue;
		}
		int l = upper_bound(d, d + k + 1, s - b[i]) - d - 1;
		f = n - c[l];
		ans = min(ans, 1ll * f * a[i]);
	}
	cout << ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
	freopen("in", "r", stdin);
	//freopen("out", "w", stdout);
#endif
	int n, m, k, x, s;
	cin >> n >> m >> k;
	cin >> x >> s;
	int a[m], b[m], c[k], d[k];
	for (int i = 0; i < m; ++i) {
		scanf("%d", &a[i]);
	}
	for (int i = 0; i < m; ++i) {
		scanf("%d", &b[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%d", &c[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%d", &d[i]);
	}
	long long ans = n * x;
	int f;
	for (int i = 0; i < k; ++i) {
		if (d[i] > s) {
			break;
		}
		f = n - c[i];
		if (f <= 0) {
			cout << 0;
			return 0;
		}
	}
	for (int i = 0; i < m; ++i) {
		if (b[i] > s) {
			continue;
		}
		//ans = min(ans, 1ll * n * a[i]);
		int l=upper_bound(d, d+k,s-b[i])-d-1;
		if(l!=-1){
			f = n - c[l];
			ans=min(ans,1ll*f*a[i]);
		}
	}
	cout << ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
	freopen("in", "r", stdin);
	//freopen("out", "w", stdout);
#endif
	int n, m, k, x, s;
	cin >> n >> m >> k;
	cin >> x >> s;
	int a[m], c[k], d[k];
	vector<pair<int,int> >M;
	int g;
	for (int i = 0; i < m; ++i) {
		scanf("%d", &a[i]);
	}
	for (int i = 0; i < m; ++i) {
		scanf("%d", &g);
		M.push_back({g,a[i]});
	}
	sort(M.begin(),M.end());
	for (int i = 0; i < k; ++i) {
		scanf("%d", &c[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%d", &d[i]);
	}
	long long ans = n * x;
	int f;
	for (int i = 0; i < k; ++i) {
		if (d[i] > s) {
			break;
		}
		f = n - c[i];
		if (f <= 0) {
			cout << 0;
			return 0;
		}
	}
	for (int i = 0; i < m; ++i) {
		if (M[i].first > s) {
			break;
		}
		ans = min(ans, 1ll * n * M[i].second);
		for (int j = 0; j < k; ++j) {
			if (M[i].first + d[j] > s) {
				break;
			}
			f = n - c[j];
			ans = min(ans, 1ll * f * M[i].second);
		}
	}
	cout << ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
	freopen("in", "r", stdin);
	//freopen("out", "w", stdout);
#endif
	long long n, m, k, x, s;
	cin >> n >> m >> k;
	cin >> x >> s;
	long long a[m], b[m], c[k], d[k];
	for (int i = 0; i < m; ++i) {
		scanf("%lld", &a[i]);
	}
	for (int i = 0; i < m; ++i) {
		scanf("%lld", &b[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%lld", &c[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%lld", &d[i]);
	}
	long long ans = n * x;
	int f;
	for (int i = 0; i < k; ++i) {
		if (d[i] > s) {
			break;
		}
		f = n - c[i];
		if (f <= 0) {
			cout << 0;
			return 0;
		}
	}
	for (int i = 0; i < m; ++i) {
		if (b[i] > s) {
			continue;
		}
		int l=upper_bound(d, d+k,s-b[i])-d-1;
		ans = min(ans, 1ll * n * a[i]);
		if(l!=-1){
			f = n - c[l];
			ans=min(ans,1ll*f*a[i]);
		}else{
			ans = min(ans, 1ll * n * a[i]);
		}
	}
	cout << ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
	freopen("in", "r", stdin);
	//freopen("out", "w", stdout);
#endif
	long long n, m, k, x, s;
	cin >> n >> m >> k;
	cin >> x >> s;
	long long a[m], b[m], c[k], d[k];
	for (int i = 0; i < m; ++i) {
		scanf("%lld", &a[i]);
	}
	for (int i = 0; i < m; ++i) {
		scanf("%lld", &b[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%lld", &c[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%lld", &d[i]);
	}
	long long ans = n * x;
	int f;
	for (int i = 0; i < k; ++i) {
		if (d[i] > s) {
			break;
		}
		f = n - c[i];
		if (f <= 0) {
			cout << 0;
			return 0;
		}
	}
	for (int i = 0; i < m; ++i) {
		if (b[i] > s) {
			continue;
		}
		int l=upper_bound(d, d+k,s-b[i])-d-1;
		if(l!=-1){
			f = n - c[l];
			ans=min(ans,1ll*f*a[i]);
		}else{
			ans = min(ans, 1ll * n * a[i]);
		}
	}
	cout << ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
	freopen("in", "r", stdin);
	//freopen("out", "w", stdout);
#endif
	long long n, m, k, x, s;
	cin >> n >> m >> k;
	cin >> x >> s;
	long long a[m], b[m], c[k], d[k];
	for (int i = 0; i < m; ++i) {
		scanf("%d", &a[i]);
	}
	for (int i = 0; i < m; ++i) {
		scanf("%d", &b[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%d", &c[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%d", &d[i]);
	}
	long long ans = n * x;
	int f;
	for (int i = 0; i < k; ++i) {
		if (d[i] > s) {
			break;
		}
		f = n - c[i];
		if (f <= 0) {
			cout << 0;
			return 0;
		}
	}
	for (int i = 0; i < m; ++i) {
		if (b[i] > s) {
			continue;
		}
		ans = min(ans, 1ll * n * a[i]);
		int l=upper_bound(d, d+k,s-b[i])-d-1;
		if(l!=-1){
			f = n - c[l];
			ans=min(ans,1ll*f*a[i]);
		}
	}
	cout << ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
	freopen("in", "r", stdin);
	//freopen("out", "w", stdout);
#endif
	int n, m, k, x, s;
	cin >> n >> m >> k;
	cin >> x >> s;
	int a[m], b[m], c[k], d[k];
	for (int i = 0; i < m; ++i) {
		scanf("%d", &a[i]);
	}
	for (int i = 0; i < m; ++i) {
		scanf("%d", &b[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%d", &c[i]);
	}
	for (int i = 0; i < k; ++i) {
		scanf("%d", &d[i]);
	}
	long long ans = n * x;
	int f;
	for (int i = 0; i < k; ++i) {
		if (d[i] > s) {
			break;
		}
		f = n - c[i];
		if (f <= 0) {
			cout << 0;
			return 0;
		}
	}
	for (int i = 0; i < m; ++i) {
		if (b[i] > s) {
			continue;
		}
		ans = min(ans, 1ll * n * a[i]);
		int l=upper_bound(d, d+k,s-b[i])-d-1;
		if(l!=-1){
			f = n - c[l];
			ans=min(ans,1ll*f*a[i]);
		}
	}
	cout << ans;
	return 0;
}


// Working program using Reader Class
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.StringTokenizer;

public class Main
{
    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();

            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }
    public static int done=0;

    public static void checkc(int[] a,int i,int sum) {
        sum+=a[i];
        if(i==a.length-1) {
            //sum+=a[i];
            if(sum==0 || sum==360) {
                done=1;
            }
        }
        else {
            checkc(a,i+1,sum);
            checka(a,i+1,sum);
        }
    }

    public static void checka(int[] a,int i,int sum) {
        sum-=a[i];
        if(i==a.length-1) {
            //sum-=a[i];
            if(sum==0 || sum==360) {
                done=1;
            }
        }
        else {
            checkc(a,i+1,sum);
            checka(a,i+1,sum);
        }
    }

    public static class Node implements Comparable<Node>{
        //HashSet<Integer> hs=new HashSet<Integer>();
        int l=0;
        int r=0;
        int ind=0;
        Node(int li,int ri,int i){
            l=li;
            r=ri;
            ind=i;
        }
        public int compareTo(Node n) {
            return this.l-n.l;
        }
    }

    public static void main(String[] args) throws IOException
    {
        Reader scan=new Reader();
//        int test=scan.nextInt();
//        for(int t=0;t<test;t++) {
            String d=scan.readLine();
            int n=Integer.parseInt(d);
            int x1=Integer.MIN_VALUE;
            int y1=Integer.MIN_VALUE;
            int x2=Integer.MAX_VALUE;
            int y2=Integer.MAX_VALUE;
            for(int i=0;i<n;i++) {
                String s=scan.readLine();
                String[] splited = s.split("\\s+");
                int x=Integer.parseInt(splited[1]);
                int y=Integer.parseInt(splited[2]);
                int a=Math.max(x, y);
                int b=Math.min(x,y);
                if(s.charAt(0)=='+') {
                    if(x1==Integer.MIN_VALUE) {
                        x1=Math.max(x, y);
                        x2=Math.min(x, y);
                        y1=x2;
                        y2=x1;
                    }
                    else {
                        x1=Math.max(x1, a);
                        y1=Math.max(y1, b);
                        x2=Math.max(x2, b);
                        y2=Math.max(a, y2);
                    }
                }
                else {
                    if((a>=x1 && b>=y1)||(a>=y2 && b>=x2)) {
                        System.out.println("YES");
                    }
                    else {
                        System.out.println("NO");
                    }
                }
            }
        //}
    }
}


// Working program using Reader Class
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.StringTokenizer;

public class Main
{
	static class Reader
	{
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader()
		{
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException
		{
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String readLine() throws IOException
		{
			byte[] buf = new byte[64]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1)
			{
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException
		{
			int ret = 0;
			byte c = read();

			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do
			{
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException
		{
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException
		{
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');

			if (c == '.')
			{
				while ((c = read()) >= '0' && c <= '9')
				{
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException
		{
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException
		{
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException
		{
			if (din == null)
				return;
			din.close();
		}
	}
	public static int done=0;

	public static void checkc(int[] a,int i,int sum) {
		sum+=a[i];
		if(i==a.length-1) {
			//sum+=a[i];
			if(sum==0 || sum==360) {
				done=1;
			}
		}
		else {
			checkc(a,i+1,sum);
			checka(a,i+1,sum);
		}
	}

	public static void checka(int[] a,int i,int sum) {
		sum-=a[i];
		if(i==a.length-1) {
			//sum-=a[i];
			if(sum==0 || sum==360) {
				done=1;
			}
		}
		else {
			checkc(a,i+1,sum);
			checka(a,i+1,sum);
		}
	}

	public static class Node implements Comparable<Node>{
		//HashSet<Integer> hs=new HashSet<Integer>();
		int l=0;
		int r=0;
		int ind=0;
		Node(int li,int ri,int i){
			l=li;
			r=ri;
			ind=i;
		}
		public int compareTo(Node n) {
			return this.l-n.l;
		}
	}

	public static void main(String[] args) throws IOException
	{
		Reader scan=new Reader();
//		int test=scan.nextInt();
//		for(int t=0;t<test;t++) {
			int n=scan.nextInt();
			int x1=Integer.MIN_VALUE;
			int y1=Integer.MIN_VALUE;
			int x2=Integer.MAX_VALUE;
			int y2=Integer.MAX_VALUE;
			for(int i=0;i<n;i++) {
				String s=scan.readLine();
				String[] splited = s.split("\\s+");
				int x=Integer.parseInt(splited[1]);
				int y=Integer.parseInt(splited[2]);
				int a=Math.max(x, y);
				int b=Math.min(x,y);
				if(s.charAt(0)=='+') {
					if(x1==Integer.MIN_VALUE) {
						x1=Math.max(x, y);
						x2=Math.min(x, y);
						y1=x2;
						y2=x1;
					}
					else {
						x1=Math.max(x1, a);
						y1=Math.max(y1, b);
						x2=Math.max(x2, b);
						y2=Math.max(a, y2);
					}
				}
				else {
					if((a>=x1 && b>=y1)||(a>=y2 && b>=x2)) {
						System.out.println("YES");
					}
					else {
						System.out.println("NO");
					}
				}
			}
		//}
	}
}


// Working program using Reader Class
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.StringTokenizer;

public class Main
{
	static class Reader
	{
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader()
		{
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException
		{
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String readLine() throws IOException
		{
			byte[] buf = new byte[64]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1)
			{
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException
		{
			int ret = 0;
			byte c = read();

			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do
			{
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException
		{
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException
		{
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			}
			while ((c = read()) >= '0' && c <= '9');

			if (c == '.')
			{
				while ((c = read()) >= '0' && c <= '9')
				{
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException
		{
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException
		{
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException
		{
			if (din == null)
				return;
			din.close();
		}
	}
	public static int done=0;

	public static void checkc(int[] a,int i,int sum) {
		sum+=a[i];
		if(i==a.length-1) {
			//sum+=a[i];
			if(sum==0 || sum==360) {
				done=1;
			}
		}
		else {
			checkc(a,i+1,sum);
			checka(a,i+1,sum);
		}
	}

	public static void checka(int[] a,int i,int sum) {
		sum-=a[i];
		if(i==a.length-1) {
			//sum-=a[i];
			if(sum==0 || sum==360) {
				done=1;
			}
		}
		else {
			checkc(a,i+1,sum);
			checka(a,i+1,sum);
		}
	}

	public static class Node implements Comparable<Node>{
		//HashSet<Integer> hs=new HashSet<Integer>();
		int l=0;
		int r=0;
		int ind=0;
		Node(int li,int ri,int i){
			l=li;
			r=ri;
			ind=i;
		}
		public int compareTo(Node n) {
			return this.l-n.l;
		}
	}

	public static void main(String[] args) throws IOException
	{
		Scanner scan=new Scanner(System.in);
//		int test=scan.nextInt();
//		for(int t=0;t<test;t++) {
			int n=scan.nextInt();
			int x1=Integer.MIN_VALUE;
			int y1=Integer.MIN_VALUE;
			int x2=Integer.MAX_VALUE;
			int y2=Integer.MAX_VALUE;
			for(int i=0;i<n;i++) {
				String s=scan.next();
				int x=scan.nextInt();
				int y=scan.nextInt();
				int a=Math.max(x, y);
				int b=Math.min(x,y);
				if(s.charAt(0)=='+') {
					if(x1==Integer.MIN_VALUE) {
						x1=Math.max(x, y);
						x2=Math.min(x, y);
						y1=x2;
						y2=x1;
					}
					else {
						x1=Math.max(x1, a);
						y1=Math.max(y1, b);
						x2=Math.max(x2, b);
						y2=Math.max(a, y2);
					}
				}
				else {
					if((a>=x1 && b>=y1)||(a>=y2 && b>=x2)) {
						System.out.println("YES");
					}
					else {
						System.out.println("NO");
					}
				}
			}
		//}
	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
public class Main {
    public static void main(String[] args)throws IOException{
        Scanner in=new Scanner(System.in);
            int n = in.nextInt();
            int maxx = 0, maxy = 0;
            for (int i = 0; i < n; ++i) {
                char type = in.next().charAt(0);
                int x = in.nextInt();
                int y = in.nextInt();
                if (x > y) {
                    int t = x;
                    x = y;
                    y = t;
                }
                if (type == '+') {
                    maxx = Math.max(maxx, x);
                    maxy = Math.max(maxy, y);
                } else {
                    if (maxx <= x && maxy <= y) {
                        System.out.println("YES");
                    } else {
                        System.out.println("NO");
                    }
                }
            }
        }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        private int pread() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public char nextCharacter() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            return (char) c;
        }

    }
}


import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class Solution {

    public static void main(String[] args) throws IOException {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        int maxx=0,maxy=0;
        while(t-->0)
        {
        char ch=sc.next().charAt(0);
        int c=0;
        if(ch=='+')
        {
            int x=sc.nextInt();
            int y=sc.nextInt();
            maxx=Math.max(maxx,(Math.max(x,y)));
            maxy=Math.max(maxy,(Math.min(x,y)));
        }
        else if(ch=='?')
        {
            int h=sc.nextInt();
            int w=sc.nextInt();
            int maxh=Math.max(h,w);
            int minw=Math.min(h,w);
            System.out.println(maxx <= maxh && maxy <= minw ? "YES" : "NO");
        }
        }
   }
}


import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class Solution {

    public static void main(String[] args) throws IOException {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        int maxx=0,maxy=0,maxh=0,maxw=0;
        int x,y;
        char ch;
        while(t-->0)
        {
        ch=sc.next().charAt(0);
        x=sc.nextInt();
        y=sc.nextInt();
        int c=0;
        if(x>=y)
            {
                maxx=x;
                maxy=y;
            }
        else
            {
                maxx=y;
                maxy=x;
            }
        if(ch=='+')
        {
            maxh=Math.max(maxx,maxh);
            maxw=Math.max(maxw,maxy);
        }
        else if(ch=='?')
        {
            System.out.println(maxh <= maxx && maxw <= maxy ? "YES" : "NO");
        }
        }
   }
}


import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class Solution {

    public static void main(String[] args) throws IOException {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        int maxx=0,miny=1000000000;
        int x,y;
        char ch;
        ch=sc.next().charAt(0);
        x=sc.nextInt();
        y=sc.nextInt();
        maxx=Math.max(x,y);
        miny=Math.min(x,y);
        t-=1;
        while(t-->0)
        {
        ch=sc.next().charAt(0);
        int c=0;
        if(ch=='+')
        {
            x=sc.nextInt();
            y=sc.nextInt();
            maxx=Math.max(maxx,(Math.max(x,y)));
            miny=Math.max(miny,(Math.min(x,y)));
        }
        else if(ch=='?')
        {
            int h=sc.nextInt();
            int w=sc.nextInt();
            int maxh=Math.max(h,w);
            int minw=Math.min(h,w);
            if((maxx<=maxh&&miny<=minw)||(maxx<=minw&&miny<=maxh))
            System.out.println("YES");
            else
            System.out.println("NO");
        }
        }
        //System.out.println(hmap);
   }
}


import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution
{
	static class InputReader
	{
	    private final InputStream stream;
	    private final byte[] buf = new byte[8192];
	    private int curChar, snumChars;

	    public InputReader(InputStream st) {
	      this.stream = st;
	    }

	    public int read() {
	      if (snumChars == -1)
	        throw new InputMismatchException();
	      if (curChar >= snumChars) {
	        curChar = 0;
	        try {
	          snumChars = stream.read(buf);
	        } catch (IOException e) {
	          throw new InputMismatchException();
	        }
	        if (snumChars <= 0)
	          return -1;
	      }
	      return buf[curChar++];
	    }

	    public int nextInt() {
	      int c = read();
	      while (isSpaceChar(c)) {
	        c = read();
	      }
	      int sgn = 1;
	      if (c == '-') {
	        sgn = -1;
	        c = read();
	      }
	      int res = 0;
	      do {
	        res *= 10;
	        res += c - '0';
	        c = read();
	      } while (!isSpaceChar(c));
	      return res * sgn;
	    }

	    public long nextLong() {
	      int c = read();
	      while (isSpaceChar(c)) {
	        c = read();
	      }
	      int sgn = 1;
	      if (c == '-') {
	        sgn = -1;
	        c = read();
	      }
	      long res = 0;
	      do {
	        res *= 10;
	        res += c - '0';
	        c = read();
	      } while (!isSpaceChar(c));
	      return res * sgn;
	    }

	    public int[] nextIntArray(int n) {
	      int a[] = new int[n];
	      for (int i = 0; i < n; i++) {
	        a[i] = nextInt();
	      }
	      return a;
	    }

	    public String readString() {
	      int c = read();
	      while (isSpaceChar(c)) {
	        c = read();
	      }
	      StringBuilder res = new StringBuilder();
	      do {
	        res.appendCodePoint(c);
	        c = read();
	      } while (!isSpaceChar(c));
	      return res.toString();
	    }

	    public String nextLine() {
	      int c = read();
	      while (isSpaceChar(c))
	        c = read();
	      StringBuilder res = new StringBuilder();
	      do {
	        res.appendCodePoint(c);
	        c = read();
	      } while (!isEndOfLine(c));
	      return res.toString();
	    }

	    public boolean isSpaceChar(int c) {
	      return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	    }

	    private boolean isEndOfLine(int c) {
	      return c == '\n' || c == '\r' || c == -1;
	    }
	}
	public static void main(String[] args) throws Exception
        {
           BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
           int q = Integer.parseInt(br.readLine());
           PrintWriter out = new PrintWriter(System.out);
           int h = Integer.MIN_VALUE,w = Integer.MIN_VALUE;
           for(int i=0;i<q;i++)
           {
                String[] str = (br.readLine()).trim().split(" ");
                int a = Integer.parseInt(str[1]);
                int b = Integer.parseInt(str[2]);
                int u = Math.min(a,b);
                int v = Math.max(a,b);
                if(str[0].equals("+"))
                {
                    h = Math.max(u,h);
                    w = Math.max(v,w);
                }
                else if(str[0].equals("?"))
                {
                    if(h <= u && w <= v)
                        out.println("YES");
                    else
                        out.println("NO");
                }
                //System.out.println(h + " " + v);
           }
           out.close();
        }
}


import java.io.*;
import java.util.*;

public class E {
	static BufferedReader br;
	static StringTokenizer st;

	static int n;
	static int one;
	static int two;

	public static void main(String[] args) throws NumberFormatException, IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		n = Integer.parseInt(br.readLine());
		char op;
		int first, second;
		one = Integer.MIN_VALUE;
		two = Integer.MIN_VALUE;

		for (int i = 0; i<n; i++) {
			st = new StringTokenizer(br.readLine());
			op = st.nextToken().charAt(0);
			first = Integer.parseInt(st.nextToken());
			second = Integer.parseInt(st.nextToken());
			if (op == '+') {
				update(first, second);
			}
			else {
				printans(first, second);
			}
		}
	}

	public static void update(int first, int second) {
		one = Math.max(one, Math.min(first, second));
		two = Math.max(two, Math.max(first, second));
	}

	public static void printans(int first, int second) {
		if (one<=first && two<=second) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		}
	}
}


import java.io.*;
import java.util.*;

public class E {
	static BufferedReader br;
	static StringTokenizer st;
	static PrintWriter pw;

	static int n;
	static int one;
	static int two;

	public static void main(String[] args) throws NumberFormatException, IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)), true);
		n = Integer.parseInt(br.readLine());
		char op;
		int first, second;
		one = Integer.MIN_VALUE;
		two = Integer.MIN_VALUE;

		for (int i = 0; i<n; i++) {
			st = new StringTokenizer(br.readLine());
			op = st.nextToken().charAt(0);
			first = Integer.parseInt(st.nextToken());
			second = Integer.parseInt(st.nextToken());
			if (op == '+') {
				update(first, second);
			}
			else {
				printans(first, second);
			}
		}
	}

	public static void update(int first, int second) {
		one = Math.max(one, Math.min(first, second));
		two = Math.max(two, Math.max(first, second));
	}

	public static void printans(int first, int second) {
		if (one<=Math.min(first, second) && two<=Math.max(first, second)) {
			pw.println("YES");
		}
		else {
			pw.println("NO");
		}
	}
}


import java.io.*;
import java.util.*;

public class E {
	static BufferedReader br;
	static StringTokenizer st;

	static int n;
	static int one;
	static int two;

	public static void main(String[] args) throws NumberFormatException, IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		n = Integer.parseInt(br.readLine());
		char op;
		int first, second;
		one = Integer.MIN_VALUE;
		two = Integer.MIN_VALUE;

		for (int i = 0; i<n; i++) {
			st = new StringTokenizer(br.readLine());
			op = st.nextToken().charAt(0);
			first = Integer.parseInt(st.nextToken());
			second = Integer.parseInt(st.nextToken());
			if (op == '+') {
				update(first, second);
			}
			else {
				printans(first, second);
			}
		}
	}

	public static void update(int first, int second) {
		one = Math.max(one, Math.min(first, second));
		two = Math.max(two, Math.max(first, second));
	}

	public static void printans(int first, int second) {
		if (one<=Math.min(first, second) && two<=Math.max(first, second)) {
			System.out.println("YES");
		}
		else {
			System.out.println("NO");
		}
	}
}


import java.util.*;
import java.io.*;

public class main{

	static int max = 5000+1;
	static FastReader in = new FastReader();
	static PrintWriter out = new PrintWriter(System.out);

	static void solve(){
		int t = in.nextInt(), x = Integer.MIN_VALUE, y = x,u,v;
		while(t-->0){
			String s = in.next();
			u = in.nextInt();
			v = in.nextInt();
			if(s.charAt(0)=='+'){
				x = Math.max(Math.max(x,y),Math.max(u,v));
				y = Math.max(Math.min(x,y),Math.min(u,v));
			}
			else{
				if((x<= u && y<=v) || (x<=v && y<=u))
					out.println("YES");
				else out.println("NO");
			}
		}
	}

	public static void main(String[] args){
		solve();
		out.flush();
		out.close();
	}

	static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }

        String next(){
            while (st == null || !st.hasMoreElements()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (IOException  e){
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine(){
            String str = "";
            try{
                str = br.readLine();
            }catch (IOException e){
                e.printStackTrace();
            }
            return str;
        }
        int nextInt(){return Integer.parseInt(in.next());}
    	long nextLong(){return Long.parseLong(in.next());}
    	double nextDouble(){return Double.parseDouble(in.next());}
    }
}

class triple{
	int i,l,r;
	public triple(int i,int l,int r){
		this.i = i;
		this.l = l;
		this.r = r;
	}
}

class mycomp implements Comparator<triple>{
	public int compare(triple x,triple y){
		if(x.l!=y.l)return x.l-y.l;
		return x.r-y.r;
	}
}

// |xvcxv|vcv[cvcvc|cxv||]vcvx:v|c|vxc|[|cvx:cxvx||||]


import java.util.*;
import java.io.*;

public class template {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        EPolycarpsNewJob solver = new EPolycarpsNewJob();
        solver.solve(1, in, out);
        out.close();
    }

    static class EPolycarpsNewJob {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int t = in.nextInt(), x = Integer.MIN_VALUE, y = x,u,v;
            while(t-->0){
                String s = in.next();
                u = in.nextInt();
                v = in.nextInt();
                if(s.charAt(0)=='+'){
                    x = Math.max(Math.max(x,y),Math.max(u,v));
                    y = Math.max(Math.min(x,y),Math.min(u,v));
                }
                else{
                    if((x<= u && y<=v) || (x<=v && y<=u))
                        out.println("YES");
                    else out.println("NO");
                }
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

class triple{
    int i,l,r;
    public triple(int i,int l,int r){
        this.i = i;
        this.l = l;
        this.r = r;
    }
}

class mycomp implements Comparator<triple>{
    public int compare(triple x,triple y){
        if(x.l!=y.l)return x.l-y.l;
        return x.r-y.r;
    }
}


import java.util.*;
import java.io.*;

public class main{

	static int max = 5000+1;
	static FastReader in = new FastReader();
	static PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args){
		// Scanner in = new Scanner(System.in);

		int t = in.nextInt(), x = Integer.MIN_VALUE, y = x,u,v;
		while(t-->0){
			String s = in.next();
			u = in.nextInt();
			v = in.nextInt();
			if(s.charAt(0)=='+'){
				x = Math.max(Math.max(x,y),Math.max(u,v));
				y = Math.max(Math.min(x,y),Math.min(u,v));
			}
			else{
				if((x<= u && y<=v) || (x<=v && y<=u))
					out.println("YES");
				else out.println("NO");
			}
		}
		close();
	}

	static void close(){
		out.flush();
		out.close();
	}

	static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }

        String next(){
            while (st == null || !st.hasMoreElements()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (IOException  e){
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine(){
            String str = "";
            try{
                str = br.readLine();
            }catch (IOException e){
                e.printStackTrace();
            }
            return str;
        }
        int nextInt(){return Integer.parseInt(in.next());}
    	long nextLong(){return Long.parseLong(in.next());}
    	double nextDouble(){return Double.parseDouble(in.next());}
    }
}

class triple{
	int i,l,r;
	public triple(int i,int l,int r){
		this.i = i;
		this.l = l;
		this.r = r;
	}
}

class mycomp implements Comparator<triple>{
	public int compare(triple x,triple y){
		if(x.l!=y.l)return x.l-y.l;
		return x.r-y.r;
	}
}

// |xvcxv|vcv[cvcvc|cxv||]vcvx:v|c|vxc|[|cvx:cxvx||||]


import java.util.*;

public class main{

	static int max = 5000+1;

	static boolean f(triple x,triple y){
		if(x.r<y.l || y.r<x.l)return false;
		return true;
	}

	static boolean allOne(int[] x){
		for(int i : x)if(i!=1)return false;
		return true;
	}

	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int t = in.nextInt(), x = Integer.MIN_VALUE, y = x,u,v;
		while(t-->0){
			String s = in.next();
			u = in.nextInt();
			v = in.nextInt();
			if(s.charAt(0)=='+'){
				x = Math.max(Math.max(x,y),Math.max(u,v));
				y = Math.max(Math.min(x,y),Math.min(u,v));
			}
			else{
				if((x<= u && y<=v) || (x<=v && y<=u))
					System.out.println("YES");
				else System.out.println("NO");
			}
		}
	}
}

class triple{
	int i,l,r;
	public triple(int i,int l,int r){
		this.i = i;
		this.l = l;
		this.r = r;
	}
}

class mycomp implements Comparator<triple>{
	public int compare(triple x,triple y){
		if(x.l!=y.l)return x.l-y.l;
		return x.r-y.r;
	}
}

// |xvcxv|vcv[cvcvc|cxv||]vcvx:v|c|vxc|[|cvx:cxvx||||]


import java.util.*;
import java.io.*;

public class main{

	static int max = 5000+1;

	static boolean f(triple x,triple y){
		if(x.r<y.l || y.r<x.l)return false;
		return true;
	}

	static boolean allOne(int[] x){
		for(int i : x)if(i!=1)return false;
		return true;
	}

	public static void main(String[] args){
		FastReader in = new FastReader();
		int t = in.nextInt(), x = Integer.MIN_VALUE, y = x,u,v;
		while(t-->0){
			String s = in.next();
			u = in.nextInt();
			v = in.nextInt();
			if(s.charAt(0)=='+'){
				x = Math.max(Math.max(x,y),Math.max(u,v));
				y = Math.max(Math.min(x,y),Math.min(u,v));
			}
			else{
				if((x<= u && y<=v) || (x<=v && y<=u))
					System.out.println("YES");
				else System.out.println("NO");
			}
		}
	}
         public static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}

class triple{
	int i,l,r;
	public triple(int i,int l,int r){
		this.i = i;
		this.l = l;
		this.r = r;
	}
}

class mycomp implements Comparator<triple>{
	public int compare(triple x,triple y){
		if(x.l!=y.l)return x.l-y.l;
		return x.r-y.r;
	}
}

// |xvcxv|vcv[cvcvc|cxv||]vcvx:v|c|vxc|[|cvx:cxvx||||]


import java.util.*;
import java.lang.*;
import java.io.*;

public class Main
{
	PrintWriter out = new PrintWriter(System.out);
	BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tok = new StringTokenizer("");
    String next() throws IOException {
        if (!tok.hasMoreTokens()) { tok = new StringTokenizer(in.readLine()); }
        return tok.nextToken();
    }
    int ni() throws IOException { return Integer.parseInt(next()); }
    long nl() throws IOException { return Long.parseLong(next()); }

    long mod=1000000007;

    void solve() throws IOException {
        int n=ni();
        int maxh=0;
        int maxw=0;
        for (int i=0;i<n;i++) {
            if (next().equals("+")) {
                int h=ni(),w=ni();
                if (h>w) { int tmp=h; h=w; w=tmp; }
                maxh=Math.max(maxh,h);
                maxw=Math.max(maxw,w);
            }
            else {
                int h=ni(),w=ni();
                if (h>w) { int tmp=h; h=w; w=tmp; }
                if (maxh>h || maxw>w) out.println("NO");
                else out.println("YES");
            }
        }
        out.flush();
    }

    int gcd(int a,int b) { return(b==0?a:gcd(b,a%b)); }
    long gcd(long a,long b) { return(b==0?a:gcd(b,a%b)); }
    long mp(long a,long p) { long r=1; while(p>0) { if ((p&1)==1) r=(r*a)%mod; p>>=1; a=(a*a)%mod; } return r; }

    public static void main(String[] args) throws IOException {
        new Main().solve();
    }
}


import java.util.*;
public class tG{
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int t=in.nextInt();

        in.nextLine();
        int a=-1,b=-1;
        StringBuffer sb=new StringBuffer();

        while(t--!=0){

            String[] op=in.nextLine().split(" ");
            int x=Integer.parseInt(op[1]);
            int y=Integer.parseInt(op[2]);

            if(x>y){
                int c=x;
                x=y;
                y=c;
            }

            if(op[0].compareTo("+")==0){
                a=Math.max(a,x);
                b=Math.max(b,y);
            }
            else{
                if(x>=a&&y>=b) sb.append("YES\n");
                else sb.append("NO\n");
            }
        }

            System.out.print(sb);
    }
}


import java.util.Scanner;

public class ProblemE {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		StringBuilder sb = new StringBuilder();
		int mx = 0;
		int my = 0;
		for(int i = 0; i < n; i++) {
			 String s = sc.next();
			 if(s.equals("+")) {
				 int x = sc.nextInt();
				 int y = sc.nextInt();
				 mx = Math.max(mx, Math.min(x, y));
				 my = Math.max(my, Math.max(x, y));
			 }else {
				int h = sc.nextInt();
				int w = sc.nextInt();
				if((mx <= h && my <= w) || (my <= h && mx <= w)) {
					sb.append("YES");
				}else {
					sb.append("NO");
				}
				sb.append("\n");
			 }
		}
		sc.close();
		System.out.print(sb.toString());
	}
}