//#pragma GCC optimize(3)
#include <random>
#include <stdio.h>
#include <bits/stdc++.h>
#include <unordered_set>
#include <unordered_map>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef pair<int, int> pii;
#define Continue(x) { x; continue; }
#define Break(x) { x; break; }
#define Return(x) { x; return; }
#define P2(x) ((x) * (x))
#define lowbit(x) ((x) & -(x))
#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(), (x).end()
#define MEM(x, y) memset((x), (y), sizeof(x))
#define MEN(x, y, z) memset((x), (y), sizeof((x)[0]) * (z))
#define Diz(x) (lower_bound(dz.begin(), dz.end(), (x)) - dz.begin())
#define DISCRETE(x) (x).push_back(INT_MIN), sort((x).begin(), (x).end()), (x).erase(unique((x).begin(), (x).end()), (x).end())
#ifdef LOCAL
#define DEBUG(...) cout << ">> " << #__VA_ARGS__ << " =", PRT(__VA_ARGS__), cout << endl;
#define DEBUGS(...) cout << ">> " << #__VA_ARGS__ << " =", PRTS(__VA_ARGS__), cout << endl;
void PRT() {} template <typename S, typename... T> void PRT(S x, T ... y){ cout << " " << x; PRT(y...); }
void PRTS() {} template <typename S> void PRTS(S x) { for (auto v : x) cout << " " << v; }
#define TIME cout << "RunTime: " << clock() << "ms\n", 0
#define __int128_t long long
#else
#define DEBUG(...) ;
#define DEBUGS(...) ;
#define TIME 0
#endif

const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9 + 7;
template<typename S, typename T> inline bool Min(S &a, const T &b){ return a > b ? a = b, true : false; }
template<typename S, typename T> inline bool Max(S &a, const T &b){ return a < b ? a = b, true : false; }
template<typename S, typename T> inline void Adm(S &a, const T &b){ a = (a + b) % MOD; if (a < 0) a += MOD; }
template<typename S, typename T> inline void Mum(S &a, const T &b){ a = 1LL * a * b % MOD; }
template<typename T> inline bool IsPri(T x) { if (x < 2) return false; for (T i = 2; i * i <= x; ++i) if (x % i == 0) return false; return true; }
template<typename T> inline T Gcd(T a, T b){ while (b){ T t = b; b = a % b; a = t; } return a; }
template<typename T> inline int BitCnt(T x){ int cnt = 0; while (x)++cnt, x &= x - 1; return cnt; }
template<typename T> inline T MDis(T x1, T y1, T x2, T y2){ return abs(x1 - x2) + abs(y1 - y2); }
template<typename T> inline T MDis(T x1, T y1, T z1, T x2, T y2, T z2){ return abs(x1 - x2) + abs(y1 - y2) + abs(z1 - z2); }
inline double EDis(double x1, double y1, double x2, double y2){ return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); }
inline double EDis(double x1, double y1, double z1, double x2, double y2, double z2){ return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2)); }
inline ll Pow(ll a, ll n) { ll t = 1; a %= MOD; while (n > 0) { if (n & 1) t = t * a % MOD; a = a * a % MOD, n >>= 1; } return t % MOD; }
#define gc p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin), p1 == p2) ? EOF : *p1++;
inline int read(){ static char buf[1000000], *p1 = buf, *p2 = buf; register int x = false; register char ch = gc; register bool sgn = false; while (ch != '-' && (ch < '0' || ch > '9')) ch = gc; if (ch == '-') sgn = true, ch = gc; while (ch >= '0'&& ch <= '9') x = (x << 1) + (x << 3) + (ch ^ 48), ch = gc; return sgn ? -x : x; }
//emplace unordered 能ll就开 函数内判非法

int n, one; //全局1个数

int Ask(int l, int r) //查询区间l到r的1个数
{
	printf("? ");
	for (int i = 1; i < l; ++i)
		putchar('1');
	for (int i = l; i <= r; ++i)
		putchar('0');
	for (int i = r + 1; i <= n; ++i)
		putchar('1');
	putchar('\n'), fflush(stdout);
	int res;
	scanf("%d", &res);
	res = (res + one - n + r - l + 1) / 2;
	return res;
}
int main()
{
#ifdef LOCAL
	//freopen("C:/input.txt", "r", stdin);
	//freopen("C:/output.txt", "w", stdout);
#endif
	scanf("%d", &n);
	printf("? ");
	for (int i = 0; i < n; ++i)
		putchar('0');
	putchar('\n'), fflush(stdout);
	scanf("%d", &one);
	int l = 1, r = n, o = one; //cnt区间1个数
	while (l + 3 <= r)
	{
		int mid = l + r >> 1;
		int res = Ask(l, mid);
		if (res != 0 && res != mid - l + 1) //不是完全同一种
			r = mid, o = res;
		else
			o = r - l + 1 - res, l = mid + 1;
	}
	int zero, one;
	for (int i = l; i <= r; ++i)
		if (Ask(i, i))
			one = i;
		else
			zero = i;
	printf("! %d %d\n", zero, one), fflush(stdout);

	return TIME;
}


//#pragma GCC optimize(3)
#include <random>
#include <stdio.h>
#include <bits/stdc++.h>
#include <unordered_set>
#include <unordered_map>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef pair<int, int> pii;
#define Continue(x) { x; continue; }
#define Break(x) { (x); break; }
#define Return(x) { x; return; }
#define P2(x) ((x) * (x))
#define lowbit(x) ((x) & -(x))
#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(), (x).end()
#define MEM(x, y) memset((x), (y), sizeof(x))
#define MEN(x, y, z) memset((x), (y), sizeof((x)[0]) * (z))
#define Diz(x) (lower_bound(dz.begin(), dz.end(), (x)) - dz.begin())
#define DISCRETE(x) (x).push_back(INT_MIN), sort((x).begin(), (x).end()), (x).erase(unique((x).begin(), (x).end()), (x).end())
#ifdef LOCAL
#define DEBUG(...) cout << ">> " << #__VA_ARGS__ << " =", PRT(__VA_ARGS__), cout << endl;
#define DEBUGS(...) cout << ">> " << #__VA_ARGS__ << " =", PRTS(__VA_ARGS__), cout << endl;
void PRT() {} template <typename S, typename... T> void PRT(S x, T ... y){ cout << " " << x; PRT(y...); }
void PRTS() {} template <typename S> void PRTS(S x) { for (auto v : x) cout << " " << v; }
#define TIME cout << "RunTime: " << clock() << "ms\n", 0
#define __int128_t long long
#else
#define DEBUG(...) ;
#define DEBUGS(...) ;
#define TIME 0
#endif

const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9 + 7;
template<typename S, typename T> inline bool Min(S &a, const T &b){ return a > b ? a = b, true : false; }
template<typename S, typename T> inline bool Max(S &a, const T &b){ return a < b ? a = b, true : false; }
template<typename S, typename T> inline void Adm(S &a, const T &b){ a = (a + b) % MOD; if (a < 0) a += MOD; }
template<typename S, typename T> inline void Mum(S &a, const T &b){ a = 1LL * a * b % MOD; }
template<typename T> inline bool IsPri(T x) { if (x < 2) return false; for (T i = 2; i * i <= x; ++i) if (x % i == 0) return false; return true; }
template<typename T> inline T Gcd(T a, T b){ while (b){ T t = b; b = a % b; a = t; } return a; }
template<typename T> inline int BitCnt(T x){ int cnt = 0; while (x)++cnt, x &= x - 1; return cnt; }
template<typename T> inline T MDis(T x1, T y1, T x2, T y2){ return abs(x1 - x2) + abs(y1 - y2); }
template<typename T> inline T MDis(T x1, T y1, T z1, T x2, T y2, T z2){ return abs(x1 - x2) + abs(y1 - y2) + abs(z1 - z2); }
inline double EDis(double x1, double y1, double x2, double y2){ return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); }
inline double EDis(double x1, double y1, double z1, double x2, double y2, double z2){ return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2)); }
inline ll Pow(ll a, ll n) { ll t = 1; a %= MOD; while (n > 0) { if (n & 1) t = t * a % MOD; a = a * a % MOD, n >>= 1; } return t % MOD; }
#define gc p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin), p1 == p2) ? EOF : *p1++;
inline int read(){ static char buf[1000000], *p1 = buf, *p2 = buf; register int x = false; register char ch = gc; register bool sgn = false; while (ch != '-' && (ch < '0' || ch > '9')) ch = gc; if (ch == '-') sgn = true, ch = gc; while (ch >= '0'&& ch <= '9') x = (x << 1) + (x << 3) + (ch ^ 48), ch = gc; return sgn ? -x : x; }
//emplace unordered 能ll就开 函数内判非法

int n, one; //全局1个数

int Ask(int l, int r) //查询区间l到r的1个数
{
	printf("? ");
	for (int i = 1; i < l; ++i)
		putchar('1');
	for (int i = l; i <= r; ++i)
		putchar('0');
	for (int i = r + 1; i <= n; ++i)
		putchar('1');
	putchar('\n'), fflush(stdout);
	int res;
	scanf("%d", &res);
	res = (res + one - n + r - l + 1) / 2;
	return res;
}
int main()
{
#ifdef LOCAL
	//freopen("C:/input.txt", "r", stdin);
	//freopen("C:/output.txt", "w", stdout);
#endif
	scanf("%d", &n);
	printf("? ");
	for (int i = 0; i < n; ++i)
		putchar('0');
	putchar('\n'), fflush(stdout);
	scanf("%d", &one);
	int l = 1, r = n, o = one; //o区间1个数
	while (l + 2 <= r) //压缩到只有2个位置且包含01结束
	{
		int mid = l + r >> 1;
		int res = Ask(l, mid);
		if (res != 0 && res != mid - l + 1) //不是完全同一种
			r = mid, o = res;
		else if (o - res != 0 && o - res != r - mid) //另一侧不是同一种
			o = r - l + 1 - res, l = mid + 1;
		else //mid为分界线 左侧为一种右侧为一种
		{
			l = mid, r = mid + 1;
			break;
		}
	}
	int zero, one;
	for (int i = l; i <= r; ++i)
		if (Ask(i, i))
			one = i;
		else
			zero = i;
	printf("! %d %d\n", zero, one), fflush(stdout);

	return TIME;
}


//#pragma GCC optimize(3)
#include <random>
#include <stdio.h>
#include <bits/stdc++.h>
#include <unordered_set>
#include <unordered_map>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef pair<int, int> pii;
#define Continue(x) { x; continue; }
#define Break(x) { x; break; }
#define Return(x) { x; return; }
#define P2(x) ((x) * (x))
#define lowbit(x) ((x) & -(x))
#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(), (x).end()
#define MEM(x, y) memset((x), (y), sizeof(x))
#define MEN(x, y, z) memset((x), (y), sizeof((x)[0]) * (z))
#define Diz(x) (lower_bound(dz.begin(), dz.end(), (x)) - dz.begin())
#define DISCRETE(x) (x).push_back(INT_MIN), sort((x).begin(), (x).end()), (x).erase(unique((x).begin(), (x).end()), (x).end())
#ifdef LOCAL
#define DEBUG(...) cout << ">> " << #__VA_ARGS__ << " =", PRT(__VA_ARGS__), cout << endl;
#define DEBUGS(...) cout << ">> " << #__VA_ARGS__ << " =", PRTS(__VA_ARGS__), cout << endl;
void PRT() {} template <typename S, typename... T> void PRT(S x, T ... y){ cout << " " << x; PRT(y...); }
void PRTS() {} template <typename S> void PRTS(S x) { for (auto v : x) cout << " " << v; }
#define TIME cout << "RunTime: " << clock() << "ms\n", 0
#define __int128_t long long
#else
#define DEBUG(...) ;
#define DEBUGS(...) ;
#define TIME 0
#endif

const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9 + 7;
template<typename S, typename T> inline bool Min(S &a, const T &b){ return a > b ? a = b, true : false; }
template<typename S, typename T> inline bool Max(S &a, const T &b){ return a < b ? a = b, true : false; }
template<typename S, typename T> inline void Adm(S &a, const T &b){ a = (a + b) % MOD; if (a < 0) a += MOD; }
template<typename S, typename T> inline void Mum(S &a, const T &b){ a = 1LL * a * b % MOD; }
template<typename T> inline bool IsPri(T x) { if (x < 2) return false; for (T i = 2; i * i <= x; ++i) if (x % i == 0) return false; return true; }
template<typename T> inline T Gcd(T a, T b){ while (b){ T t = b; b = a % b; a = t; } return a; }
template<typename T> inline int BitCnt(T x){ int cnt = 0; while (x)++cnt, x &= x - 1; return cnt; }
template<typename T> inline T MDis(T x1, T y1, T x2, T y2){ return abs(x1 - x2) + abs(y1 - y2); }
template<typename T> inline T MDis(T x1, T y1, T z1, T x2, T y2, T z2){ return abs(x1 - x2) + abs(y1 - y2) + abs(z1 - z2); }
inline double EDis(double x1, double y1, double x2, double y2){ return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); }
inline double EDis(double x1, double y1, double z1, double x2, double y2, double z2){ return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2)); }
inline ll Pow(ll a, ll n) { ll t = 1; a %= MOD; while (n > 0) { if (n & 1) t = t * a % MOD; a = a * a % MOD, n >>= 1; } return t % MOD; }
#define gc p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin), p1 == p2) ? EOF : *p1++;
inline int read(){ static char buf[1000000], *p1 = buf, *p2 = buf; register int x = false; register char ch = gc; register bool sgn = false; while (ch != '-' && (ch < '0' || ch > '9')) ch = gc; if (ch == '-') sgn = true, ch = gc; while (ch >= '0'&& ch <= '9') x = (x << 1) + (x << 3) + (ch ^ 48), ch = gc; return sgn ? -x : x; }
//emplace unordered 能ll就开 函数内判非法

int n, one; //全局1个数

int Ask(int l, int r) //查询区间l到r的1个数
{
	printf("? ");
	for (int i = 1; i < l; ++i)
		putchar('1');
	for (int i = l; i <= r; ++i)
		putchar('0');
	for (int i = r + 1; i <= n; ++i)
		putchar('1');
	putchar('\n'), fflush(stdout);
	int res;
	scanf("%d", &res);
	res = ((res + one) - (r - l + 1)) / 2;
	return res;
}
int main()
{
#ifdef LOCAL
	//freopen("C:/input.txt", "r", stdin);
	//freopen("C:/output.txt", "w", stdout);
#endif
	scanf("%d", &n);
	printf("? ");
	for (int i = 0; i < n; ++i)
		putchar('0');
	putchar('\n'), fflush(stdout);
	scanf("%d", &one);
	int l = 1, r = n, o = one; //cnt区间1个数
	while (l + 3 <= r)
	{
		int mid = l + r >> 1;
		int res = Ask(l, mid);
		if (res != 0 && res != mid - l + 1) //不是完全同一种
			r = mid, o = res;
		else
			o = r - l + 1 - res, l = mid + 1;
	}
	int zero, one;
	for (int i = l; i <= r; ++i)
		if (Ask(i, i))
			one = i;
		else
			zero = i;
	printf("! %d %d\n", zero, one), fflush(stdout);

	return TIME;
}


//#pragma GCC optimize(3)
#include <random>
#include <stdio.h>
#include <bits/stdc++.h>
#include <unordered_set>
#include <unordered_map>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef pair<int, int> pii;
#define Continue(x) { x; continue; }
#define Break(x) { x; break; }
#define Return(x) { x; return; }
#define P2(x) ((x) * (x))
#define lowbit(x) ((x) & -(x))
#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(), (x).end()
#define MEM(x, y) memset((x), (y), sizeof(x))
#define MEN(x, y, z) memset((x), (y), sizeof((x)[0]) * (z))
#define Diz(x) (lower_bound(dz.begin(), dz.end(), (x)) - dz.begin())
#define DISCRETE(x) (x).push_back(INT_MIN), sort((x).begin(), (x).end()), (x).erase(unique((x).begin(), (x).end()), (x).end())
#ifdef LOCAL
#define DEBUG(...) cout << ">> " << #__VA_ARGS__ << " =", PRT(__VA_ARGS__), cout << endl;
#define DEBUGS(...) cout << ">> " << #__VA_ARGS__ << " =", PRTS(__VA_ARGS__), cout << endl;
void PRT() {} template <typename S, typename... T> void PRT(S x, T ... y){ cout << " " << x; PRT(y...); }
void PRTS() {} template <typename S> void PRTS(S x) { for (auto v : x) cout << " " << v; }
#define TIME cout << "RunTime: " << clock() << "ms\n", 0
#define __int128_t long long
#else
#define DEBUG(...) ;
#define DEBUGS(...) ;
#define TIME 0
#endif

const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9 + 7;
template<typename S, typename T> inline bool Min(S &a, const T &b){ return a > b ? a = b, true : false; }
template<typename S, typename T> inline bool Max(S &a, const T &b){ return a < b ? a = b, true : false; }
template<typename S, typename T> inline void Adm(S &a, const T &b){ a = (a + b) % MOD; if (a < 0) a += MOD; }
template<typename S, typename T> inline void Mum(S &a, const T &b){ a = 1LL * a * b % MOD; }
template<typename T> inline bool IsPri(T x) { if (x < 2) return false; for (T i = 2; i * i <= x; ++i) if (x % i == 0) return false; return true; }
template<typename T> inline T Gcd(T a, T b){ while (b){ T t = b; b = a % b; a = t; } return a; }
template<typename T> inline int BitCnt(T x){ int cnt = 0; while (x)++cnt, x &= x - 1; return cnt; }
template<typename T> inline T MDis(T x1, T y1, T x2, T y2){ return abs(x1 - x2) + abs(y1 - y2); }
template<typename T> inline T MDis(T x1, T y1, T z1, T x2, T y2, T z2){ return abs(x1 - x2) + abs(y1 - y2) + abs(z1 - z2); }
inline double EDis(double x1, double y1, double x2, double y2){ return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); }
inline double EDis(double x1, double y1, double z1, double x2, double y2, double z2){ return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2)); }
inline ll Pow(ll a, ll n) { ll t = 1; a %= MOD; while (n > 0) { if (n & 1) t = t * a % MOD; a = a * a % MOD, n >>= 1; } return t % MOD; }
#define gc p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin), p1 == p2) ? EOF : *p1++;
inline int read(){ static char buf[1000000], *p1 = buf, *p2 = buf; register int x = false; register char ch = gc; register bool sgn = false; while (ch != '-' && (ch < '0' || ch > '9')) ch = gc; if (ch == '-') sgn = true, ch = gc; while (ch >= '0'&& ch <= '9') x = (x << 1) + (x << 3) + (ch ^ 48), ch = gc; return sgn ? -x : x; }
//emplace unordered 能ll就开 函数内判非法

int n, one; //全局1个数

int Ask(int l, int r) //查询区间l到r的1个数
{
	for (int i = 1; i < l; ++i)
		putchar('1');
	for (int i = l; i <= r; ++i)
		putchar('0');
	for (int i = r + 1; i <= n; ++i)
		putchar('1');
	putchar('\n'), fflush(stdout);
	int res;
	scanf("%d", &res);
	res = ((res + one) - (r - l + 1)) / 2;
	return res;
}
int main()
{
#ifdef LOCAL
	//freopen("C:/input.txt", "r", stdin);
	//freopen("C:/output.txt", "w", stdout);
#endif
	scanf("%d", &n);
	printf("? ");
	for (int i = 0; i < n; ++i)
		putchar('0');
	putchar('\n'), fflush(stdout);
	scanf("%d", &one);
	int l = 1, r = n, o = one; //cnt区间1个数
	while (l + 3 <= r)
	{
		int mid = l + r >> 1;
		int res = Ask(l, mid);
		if (res != 0 && res != mid - l + 1) //不是完全同一种
			r = mid, o = res;
		else
			o = r - l + 1 - res, l = mid + 1;
	}
	int zero, one;
	for (int i = l; i <= r; ++i)
		if (Ask(i, i))
			one = i;
		else
			zero = i;
	printf("! %d %d\n", zero, one), fflush(stdout);

	return TIME;
}


//#pragma GCC optimize(3)
#include <random>
#include <stdio.h>
#include <bits/stdc++.h>
#include <unordered_set>
#include <unordered_map>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
typedef pair<int, int> pii;
#define Continue(x) { x; continue; }
#define Break(x) { (x); break; }
#define Return(x) { x; return; }
#define P2(x) ((x) * (x))
#define lowbit(x) ((x) & -(x))
#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(), (x).end()
#define MEM(x, y) memset((x), (y), sizeof(x))
#define MEN(x, y, z) memset((x), (y), sizeof((x)[0]) * (z))
#define Diz(x) (lower_bound(dz.begin(), dz.end(), (x)) - dz.begin())
#define DISCRETE(x) (x).push_back(INT_MIN), sort((x).begin(), (x).end()), (x).erase(unique((x).begin(), (x).end()), (x).end())
#ifdef LOCAL
#define DEBUG(...) cout << ">> " << #__VA_ARGS__ << " =", PRT(__VA_ARGS__), cout << endl;
#define DEBUGS(...) cout << ">> " << #__VA_ARGS__ << " =", PRTS(__VA_ARGS__), cout << endl;
void PRT() {} template <typename S, typename... T> void PRT(S x, T ... y){ cout << " " << x; PRT(y...); }
void PRTS() {} template <typename S> void PRTS(S x) { for (auto v : x) cout << " " << v; }
#define TIME cout << "RunTime: " << clock() << "ms\n", 0
#define __int128_t long long
#else
#define DEBUG(...) ;
#define DEBUGS(...) ;
#define TIME 0
#endif

const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9 + 7;
template<typename S, typename T> inline bool Min(S &a, const T &b){ return a > b ? a = b, true : false; }
template<typename S, typename T> inline bool Max(S &a, const T &b){ return a < b ? a = b, true : false; }
template<typename S, typename T> inline void Adm(S &a, const T &b){ a = (a + b) % MOD; if (a < 0) a += MOD; }
template<typename S, typename T> inline void Mum(S &a, const T &b){ a = 1LL * a * b % MOD; }
template<typename T> inline bool IsPri(T x) { if (x < 2) return false; for (T i = 2; i * i <= x; ++i) if (x % i == 0) return false; return true; }
template<typename T> inline T Gcd(T a, T b){ while (b){ T t = b; b = a % b; a = t; } return a; }
template<typename T> inline int BitCnt(T x){ int cnt = 0; while (x)++cnt, x &= x - 1; return cnt; }
template<typename T> inline T MDis(T x1, T y1, T x2, T y2){ return abs(x1 - x2) + abs(y1 - y2); }
template<typename T> inline T MDis(T x1, T y1, T z1, T x2, T y2, T z2){ return abs(x1 - x2) + abs(y1 - y2) + abs(z1 - z2); }
inline double EDis(double x1, double y1, double x2, double y2){ return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); }
inline double EDis(double x1, double y1, double z1, double x2, double y2, double z2){ return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2)); }
inline ll Pow(ll a, ll n) { ll t = 1; a %= MOD; while (n > 0) { if (n & 1) t = t * a % MOD; a = a * a % MOD, n >>= 1; } return t % MOD; }
#define gc p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin), p1 == p2) ? EOF : *p1++;
inline int read(){ static char buf[1000000], *p1 = buf, *p2 = buf; register int x = false; register char ch = gc; register bool sgn = false; while (ch != '-' && (ch < '0' || ch > '9')) ch = gc; if (ch == '-') sgn = true, ch = gc; while (ch >= '0'&& ch <= '9') x = (x << 1) + (x << 3) + (ch ^ 48), ch = gc; return sgn ? -x : x; }
//emplace unordered 能ll就开 函数内判非法

int n, one; //全局1个数

int Ask(int l, int r) //查询区间l到r的1个数
{
	printf("? ");
	for (int i = 1; i < l; ++i)
		putchar('1');
	for (int i = l; i <= r; ++i)
		putchar('0');
	for (int i = r + 1; i <= n; ++i)
		putchar('1');
	putchar('\n'), fflush(stdout);
	int res;
	scanf("%d", &res);
	res = (res + one - n + r - l + 1) / 2;
	return res;
}
int main()
{
#ifdef LOCAL
	//freopen("C:/input.txt", "r", stdin);
	//freopen("C:/output.txt", "w", stdout);
#endif
	scanf("%d", &n);
	printf("? ");
	for (int i = 0; i < n; ++i)
		putchar('0');
	putchar('\n'), fflush(stdout);
	scanf("%d", &one);
	int l = 1, r = n, o = one; //o区间1个数
	while (l + 2 <= r) //压缩到只有2个位置且包含01结束
	{
		int mid = l + r >> 1;
		int res = Ask(l, mid);
		if (res != 0 && res != mid - l + 1) //不是完全同一种
			r = mid, o = res;
		else if (o - res != 0 && o - res != r - mid) //另一侧不是同一种
			o = o - res, l = mid + 1;
		else //mid为分界线 左侧为一种右侧为一种
		{
			l = mid, r = mid + 1;
			break;
		}
	}
	int zero, one;
	for (int i = l; i <= r; ++i)
		if (Ask(i, i))
			one = i;
		else
			zero = i;
	printf("! %d %d\n", zero, one), fflush(stdout);

	return TIME;
}


#include <bits/stdc++.h>

using namespace std;

int sendQuery(int n, int t)
{
    printf("? ");
    for(int i = 1; i <= t; i++)   printf("1");
    for(int i = t+1; i <= n; i++) printf("0");
    printf("\n");
    fflush(stdout);   //
    int dis;
    scanf("%d", &dis);
    return dis;
}
int main(void)
{
    int n;
    cin>>n;
    int a = sendQuery(n, 0);
    int b = sendQuery(n, 1);
    int ans[2];
    if(a > b){                  //第一位是1
        ans[0] = 1;
        int low = 2, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(b - sendQuery(n, mid) == mid - 1){
                low = mid + 1;
                ans[1] = mid;
            }else {
                high = mid - 1;
            }
        }
    }else {                     //第一位是0
        ans[1] = 1;
        int low = 2, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(sendQuery(n, mid) - a == mid - 1){
                low = mid + 1;
                ans[0] = mid;
            }else{
                high = mid - 1;
            }
        }
    }
    printf("! %d %d\n", ans[0], ans[1]);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int sendQuery(int n, int t)
{
    printf("? ");
    for(int i = 1; i <= t; i++)   printf("1");
    for(int i = t+1; i <= n; i++) printf("0");
    printf("\n");
    fflush(stdout);
    int dis = 0;
    scanf("%d", &dis);
    return dis;
}
int main(void)
{
    int n;
    cin>>n;
    int a = sendQuery(n, 0);
    int b = sendQuery(n, 1);
    int ans[2];
    if(a > b){                  //第一位是1
        ans[0] = 1;
        int low = 2, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(a - sendQuery(n, mid) == mid){
                low = mid + 1;
            }else {
                high = mid - 1;
                ans[1] = mid;
            }
        }
    }else {                     //第一位是0
        ans[1] = 1;
        int low = 2, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(sendQuery(n, mid) - a == mid){
                low = mid + 1;
            }else{
                high = mid - 1;
                ans[0] = mid;
            }
        }
    }
    printf("! %d %d\n", ans[0], ans[1]);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int sendQuery(int n, int t)
{
    printf("? ");
    for(int i = 1; i <= t; i++)   printf("1");
    for(int i = t+1; i <= n; i++) printf("0");
    printf("\n");
    fflush(stdout);   //
    int dis;
    scanf("%d", &dis);
    return dis;
}
int main(void)
{
    int n;
    cin>>n;
    int a = sendQuery(n, 0);
    int b = sendQuery(n, 1);
    int ans[2];
    if(a > b){                  //第一位是1
        ans[0] = 1;
        int low = 2, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(b - sendQuery(n, mid) == mid - 1){
                low = mid + 1;
                ans[1] = mid;
            }else {
                high = mid - 1;
            }
        }
    }else {                     //第一位是0
        ans[1] = 1;
        int low = 2, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(b - sendQuery(n, mid) == mid - 1){
                low = mid + 1;
                ans[0] = mid;
            }else{
                high = mid - 1;
            }
        }
    }
    printf("! %d %d\n", ans[0], ans[1]);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

//char pre[] = "11100";

int sendQuery(int n, int t)
{
    printf("? ");
    for(int i = 1; i <= t; i++)   printf("1");
    for(int i = t+1; i <= n; i++) printf("0");
    printf("\n");
    fflush(stdout);   //
    int dis = 0;
    scanf("%d", &dis);
    /*
    for(int i = 1; i <= t; i++){
        if(pre[i-1] != '1')  dis++;
    }
    for(int i = t + 1; i <= n; i++){
        if(pre[i-1] != '0')  dis++;
    }*/
    return dis;
}
int main(void)
{
    int n;
    cin>>n;
    int a = sendQuery(n, 0);
    int b = sendQuery(n, 1);
    int ans[2];
    if(a > b){                  //第一位是1
        ans[0] = 1;
        int low = 1, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(b - sendQuery(n, mid) == mid - 1){
                low = mid + 1;
                ans[1] = mid + 1;
            }else {
                high = mid - 1;
            }
        }
    }else {                     //第一位是0
        ans[1] = 1;
        int low = 1, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(sendQuery(n, mid) - b == mid - 1){
                low = mid + 1;
                ans[0] = mid + 1;
            }else{
                high = mid - 1;
            }
        }
    }
    printf("! %d %d\n", ans[0], ans[1]);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int sendQuery(int n, int t)
{
    printf("? ");
    for(int i = 1; i <= t; i++)   printf("1");
    for(int i = t+1; i <= n; i++) printf("0");
    printf("\n");
    fflush(stdout);
    int dis = 0;
    scanf("%d", &dis);
    return dis;
}
int main(void)
{
    int n;
    cin>>n;
    int a = sendQuery(n, 0);
    int b = sendQuery(n, 1);
    int ans[2];
    if(a > b){                  //第一位是1
        ans[0] = 1;
        int low = 2, high = n;
        while(low <= high){
            int mid = (low + high) / 2;
            if(a - sendQuery(n, mid) == mid){
                low = mid + 1;
            }else {
                high = mid - 1;
                ans[1] = mid;
            }
        }
    }else {                     //第一位是0
        ans[1] = 1;
        int low = 2, high = n;
        while(low <= high){
            int mid = (low + high) / 2;
            if(sendQuery(n, mid) - a == mid){
                low = mid + 1;
            }else{
                high = mid - 1;
                ans[0] = mid;
            }
        }
    }
    printf("! %d %d\n", ans[0], ans[1]);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int sendQuery(int n, int t)
{
    printf("? ");
    for(int i = 1; i <= t; i++)   printf("1");
    for(int i = t+1; i <= n; i++) printf("0");
    printf("\n");
    fflush(stdout);
    int dis = 0;
    scanf("%d", &dis);
    return dis;
}
int main(void)
{
    int n;
    cin>>n;
    int a = sendQuery(n, 0);
    int b = sendQuery(n, 1);
    int ans[2];
    if(a > b){                  //第一位是1
        ans[1] = 1;
        int low = 2, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(a - sendQuery(n, mid) == mid){
                low = mid + 1;
            }else {
                high = mid - 1;
                ans[0] = mid;
            }
        }
    }else {                     //第一位是0
        ans[0] = 1;
        int low = 2, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(sendQuery(n, mid) - a == mid){
                low = mid + 1;
            }else{
                high = mid - 1;
                ans[1] = mid;
            }
        }
    }
    printf("! %d %d\n", ans[0], ans[1]);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

//char pre[] = "11100";

int sendQuery(int n, int t)
{
    printf("? ");
    for(int i = 1; i <= t; i++)   printf("1");
    for(int i = t+1; i <= n; i++) printf("0");
    printf("\n");
    fflush(stdout);   //
    int dis = 0;
    scanf("%d", &dis);
    /*
    for(int i = 1; i <= t; i++){
        if(pre[i-1] != '1')  dis++;
    }
    for(int i = t + 1; i <= n; i++){
        if(pre[i-1] != '0')  dis++;
    }*/
    return dis;
}
int main(void)
{
    int n;
    cin>>n;
    int a = sendQuery(n, 0);
    int b = sendQuery(n, 1);
    int ans[2];
    if(a > b){                  //第一位是1
        ans[1] = 1;
        int low = 1, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(b - sendQuery(n, mid) == mid - 1){
                low = mid + 1;
                ans[0] = mid + 1;
            }else {
                high = mid - 1;
            }
        }
    }else {                     //第一位是0
        ans[0] = 1;
        int low = 1, high = n;
        while(low <= high){
            int mid = low + (high - low) / 2;
            if(sendQuery(n, mid) - b == mid - 1){
                low = mid + 1;
                ans[1] = mid + 1;
            }else{
                high = mid - 1;
            }
        }
    }
    printf("! %d %d\n", ans[0], ans[1]);
    return 0;
}


#include<iostream>
using namespace std;
#define ll long long

int main()
{
    ll n,m,k,i,j;
    cin>>n>>m>>k;
    ll x,s;
    cin>>x>>s;
    ll a[m];
    ll b[m];
    ll c[k];
    ll d[k];
    ll ans = n*x;
    for(i=0;i<m;i++)
        cin>>a[i];
    for(i=0;i<m;i++)
        cin>>b[i];
    for(i=0;i<k;i++)
        cin>>c[i];
    for(i=0;i<k;i++)
        cin>>d[i];
    for(i=0;i<m;i++)
    {
        if(b[i]<=s)
        {
            ans = min(ans,n*a[i]);
        }
    }
    for(i=0;i<k;i++)
    {
        if(d[i]<=s)
        {
            ans = min(ans,(n-c[i])*x);
        }
    }
    for(i=0;i<k&&d[i]<s;i++)
    {
        for(j=0;j<m;j++)
        {
            if(d[i]+b[j]<=s)
            {
                ans = min(ans,(n-c[i])*a[j]);
            }
        }
    }
    cout<<ans;
}


#include<iostream>
using namespace std;
#define ll long long
ll k;
ll binary(ll arr[],ll l,ll r,ll max1)
{
	//cout<<"\nl = "<<l<<" and r = "<<r;
	if(l<=r)
	{
    ll m = l+ (r-l)/2;
    if(m<k-1&&arr[m]<=max1&&arr[m+1]>max1)
    {
    	//cout<<"\nreturning m = "<<m;
        return m;
    }
    else if(arr[m]<max1)
        return binary(arr,m+1,r,max1);
    else
        return binary(arr,l,m-1,max1);
    //cout<<"\nreturning -1";

    }
    return -1;
}

int main()
{
    ll n,m,i,j;
    cin>>n>>m>>k;
    ll x,s;
    cin>>x>>s;
    ll *a = new ll[m];
    ll *b = new ll[m];
    ll *c = new ll[k];
    ll *d = new ll[k];

    ll ans = n*x;
    for(i=0;i<m;i++)
        cin>>a[i];

    for(i=0;i<m;i++)
        cin>>b[i];

    for(j=0;j<k;j++)
        cin>>c[j];

    for(j=0;j<k;j++)
    {
    	//cout<<"as"<<j;
        cin>>d[j];
    }
    //cout<<d[j-1];
    for(i=0;i<m;i++)
    {
        if(b[i]<=s)
        {
            ans = min(ans,n*a[i]);
        }
    }

    for(i=0;i<k&&d[i]<=s;i++)
    {
        if(d[i]<=s)
        {
            ans = min(ans,(n-c[i])*x);
        }
    }

    for(j=0;j<m&&b[j]<s;j++)
    {
    //cout<<"\nj = "<<j;
        i = binary(d,0,k-1,s-b[j]);

        if(i!=-1&&d[i]+b[j]<=s)
        {
            ans = min(ans,(n-c[i])*a[j]);
        }
    }
    cout<<ans;
}


#include<iostream>
using namespace std;
#define ll long long
ll k;
ll binary(ll arr[],ll l,ll r,ll max1)
{
	//cout<<"\nl = "<<l<<" and r = "<<r;
	if(l<=r)
	{
    ll m = l+ (r-l)/2;
    if(m<k-1&&arr[m]<=max1&&arr[m+1]>max1)
    {
    	//cout<<"\nreturning m = "<<m;
        return m;
    }
    else if(m==k-1&&arr[m]<=max1)
    	return m;
    else if(arr[m]<=max1)
        return binary(arr,m+1,r,max1);
    else
        return binary(arr,l,m-1,max1);
    //cout<<"\nreturning -1";

    }
    return -1;
}

int main()
{
    ll n,m,i,j;
    cin>>n>>m>>k;
    ll x,s;
    cin>>x>>s;
    ll *a = new ll[m];
    ll *b = new ll[m];
    ll *c = new ll[k];
    ll *d = new ll[k];

    ll ans = n*x;
    for(i=0;i<m;i++)
        cin>>a[i];

    for(i=0;i<m;i++)
        cin>>b[i];

    for(j=0;j<k;j++)
        cin>>c[j];

    for(j=0;j<k;j++)
    {
    	//cout<<"as"<<j;
        cin>>d[j];
    }
    //cout<<d[j-1];
    for(i=0;i<m;i++)
    {
        if(b[i]<=s)
        {
            ans = min(ans,n*a[i]);
        }
    }

    for(i=0;i<k&&d[i]<=s;i++)
    {
        if(d[i]<=s)
        {
            ans = min(ans,(n-c[i])*x);
        }
    }

    for(j=0;j<m;j++)
    {
    //cout<<"\nj = "<<j;
        i = binary(d,0,k-1,s-b[j]);
		//cout<<"\ni = "<<i;
        if(i!=-1&&d[i]+b[j]<=s)
        {
            ans = min(ans,(n-c[i])*a[j]);
        }
    }
    cout<<ans;
}


#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int n,c=0,x,s;
	vector<pair<int,int> > a;
	vector<pair<int,int > > b;
int dp2(int i,int k)
{
//	cout<<"hello"<<b[k].second<<" ";
	return (n-b[k].first)*a[i].first;
}
void dp(int i)
{
	int k=0,ans=1;
	while(ans)
	{
		if(a[i].second+b[k].second<s)
			{	c=min(c,dp2(i,k));ans=0;}
		k++;
	}
}
int main ()
{
	int i,m,k;
	while(cin>>n>>m>>k>>x>>s){
	a.resize(m+1);
	b.resize(k+1);
	a[0].first=x;
	a[0].second=0;
	b[0].first=0;
	b[0].second=0;
	for(i=1;i<=m;i++)
		cin>>a[i].first;
	for(i=1;i<=m;i++)
		cin>>a[i].second;
	for(i=1;i<=k;i++)
		cin>>b[i].first;
	for(i=1;i<=k;i++)
		cin>>b[i].second;
	sort(a.begin(),a.end());
	sort(b.begin(),b.end(),greater<pair<int,int> >());
	c=n*x;
	for(i=0;i<=m;i++)
		if(a[i].second<=s)
				dp(i);
	cout<<c<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    ll l = 0,r = k,mid;
    while(l < r){
        ll mid = (l+r)/2;
        if(d[mid] < s) l = mid,mid =  (r+l)/2;
        else r = mid,mid = (mid+r)/2;
    }
    for(ll i = 0;i < mid+1;i++){
        if(d[i] < s){
            for(ll j = 0;j < m;j++)
                if(b[j] + d[i] <= s) sum = min(sum,(n-c[i])*a[j]);
        }
        else break;
    }
    for(ll j = 0;j < m;j++){
            if(b[j] <= s) sum = min(sum,n*a[j]);
    }
    printf("%I64d\n",sum);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = (n - c[upper_bound(d,d+k,s)-d])*x;
    for(ll i = 0;i < m;i++){
        if(b[i] <= s) sum = min(sum,(n - c[upper_bound(d,d+k,s)-d])*a[i]);
    }
    printf("%I64d\n",sum);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200005],b[200005],c[200005],d[200005];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    for(ll i = k-1;i >= 0;i--){
        if(d[i] <= s){
            for(ll j = 0;j < m;j++){
                if(b[j] + d[i] <= s&&c[i] <= n) sum = min(sum,(n-c[i])*a[j]);
            }
        }
    }
    printf("%I64d\n",sum);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&d[i]);
    ll sum = x*n;
    for(int i = 0;i < m;i++){
        if(b[i] > s) continue;
        else{
            sum = min(sum,a[i]*(n-c[lower_bound(d+1,d+k+1,s-b[i])-d-1]));
        }
    }
    printf("%I64d\n",sum);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{

    ll n,m,k,x,cost;
    while(cin>>n>>m>>k)
    {
        cin>>x>>cost;
        ll a[100005],b[100005],c[100005],d[100005],f[10005];
        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];
        }
        vector<pair<ll,ll> > v;
        for(int i=1; i<=m; i++)
        {
            v.push_back(make_pair(b[i],a[i]));
        }
        sort(v.begin(),v.end());
        ll min1=1000000008;
        for(int i=0; i<m; i++)
        {
            if(v[i].second<min1)
            {
                min1=v[i].second;
                f[i]=min1;
            }
            else
                f[i]=f[i-1];
        }
        int j=m-1;
        c[0]=0;
        d[0]=0;
        ll ans=1000000008;
        for(int i=0; i<=n; i++)
        {
            while(j>=0&&v[j].first>cost-d[i])
            {
                j--;
            }
            if(j==-1)
            {
                if(cost-d[i]>=0)
                    ans=min(ans,(n-c[i])*x);
            }
            else
                ans=min(ans,(n-c[i])*f[j]);
        }
        cout<<ans;
    }
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <memory.h>
#include <stdio.h>
#include <sstream>
#include <deque>
const int pi=acos(-1);
typedef long long ll;
using namespace std;
map<int,int>d;
ll n,m,k,x,s;
ll ans,lel;
vector<int>v,a,temp;
vector<pair<int,int> >u;
int main()
{
    while(~scanf("%I64d%I64d%I64d%I64d%I64d",&n,&m,&k,&x,&s))
    {
        v.resize(m);
        a.resize(m);
        u.resize(k);
        for(int i=0; i<m; i++)
            scanf("%d",&v[i]);
        for(int i=0; i<m; i++)
            scanf("%d",&a[i]);
        for(int i=0; i<k; i++)
            scanf("%d",&u[i].second);
        for(int i=0; i<k; i++)
            scanf("%d",&u[i].first);
        sort(u.begin(),u.end());
        for(int i=1; i<k; i++)
            u[i].second=max(u[i].second,u[i-1].second);
        ans=x*n;
        for(int i=0; i<k; i++)
            d[u[i].first]=max(u[i].second,d[u[i].first]);
        temp.resize(k);
        for(int i=0; i<k; i++)
            temp[i]=u[i].first;
        for(int i=0; i<m; i++)
        {
            int left=s-a[i];
            if(left<0)
                continue;
            int y=upper_bound(temp.begin(),temp.end(),left)-temp.begin();
            --y;
            if(y<0)
            {
                lel=n*v[i];
                ans=min(ans,lel);
                continue;
            }
            lel=(n-d[temp[y]])*v[i];
            ans=min(ans,lel);
        }
        for(int i=0; i<k; i++)
            if(temp[i]<=s)
            {
                lel=(n-d[temp[i]])*x;
                ans=min(ans,lel);
            }
        printf("%I64d\n",ans);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&d[i]);
    ll sum = x*(n-c[upper_bound(d+1,d+k+1,s)-d-1]);
    for(int i = 0;i < m;i++){
        if(b[i] > s) continue;
        else
            sum = min(sum,a[i]*(n-c[upper_bound(d+1,d+k+1,s-b[i])-d-1]));
    }
    printf("%I64d\n",sum);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    ll l = 0,r = k,mid;
    while(l < r){
        ll mid = (l+k)/2;
        if(d[mid] < s) l = mid,mid =  (r+l)/2;
        else r = mid,mid = (mid+r)/2;
    }
    for(ll i = 0;i < mid+1;i++){
        if(d[i] < s){
            for(ll j = 0;j < m;j++)
                if(b[j] + d[i] <= s) sum = min(sum,(n-c[i])*a[j]);
        }
        else break;
    }
    for(ll j = 0;j < m;j++){
            if(b[j] <= s) sum = min(sum,n*a[j]);
    }
    printf("%I64d\n",sum);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#define ll long long
using namespace std;

const int maxn=2e5+10;
int t1[maxn],c1[maxn];
int t2[maxn],c2[maxn];
ll ans=0;
int n,m,k,x,s;

void solve(int now)
{
   	int l=1,r=k,mid;
   	while(l<=r)
   	{
   		mid=((l+r)>>1);
   		if(c2[mid]+c1[now]<=s){
   			ll mi=(n-t2[mid])*t1[now];
   			ans=min(ans,mi);
   			l=mid+1;
   		}
   		else r=mid-1;
   	}
}

int main()
{
	while(~scanf("%d%d%d",&n,&m,&k)){
	scanf("%d%d",&x,&s);
	ans=(ll)x*n;
	for(int i=1;i<=m;i++)  scanf("%d",&t1[i]);
	for(int i=1;i<=m;i++)  scanf("%d",&c1[i]);
    for(int i=1;i<=k;i++)  scanf("%d",&t2[i]);
    for(int i=1;i<=k;i++)  scanf("%d",&c2[i]);
    for(int i=k;i;i--)  if(c2[i]<=s) {
    	ans=min(ans,(ll)(n-t2[i])*x);
    	if(c2[i]==c2[i-1]) t2[i-1]=t2[i];
    }
	for(int i=1;i<=m;i++)
	  if(c1[i]<=s)  {ans=min(ans,(ll)t1[i]*n);solve(i);}
	cout<<ans<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    ll l = 0,r = k-1,mid;
    while(l < r){
        ll mid = (l+r)/2;
        if(d[mid] < s) l = mid,mid =  (r+l)/2;
        else if(d[mid] > s) r = mid,mid = (l+r)/2;
        else break;
    }
    for(ll i = 0;i < mid+1;i++){
        if(d[i] < s){
            for(ll j = 0;j < m;j++)
                if(b[j] + d[i] <= s) sum = min(sum,(n-c[i])*a[j]);
        }
        else break;
    }
    for(ll j = 0;j < m;j++){
            if(b[j] <= s) sum = min(sum,n*a[j]);
    }
    printf("%I64d\n",sum);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    ll l = 0,r = k,mid;
    while(l < r){
        ll mid = (l+r)/2;
        if(d[mid] < s) l = mid,mid =  (r+l)/2;
        else if(d[mid] > s) r = mid,mid = (mid+r)/2;
        else break;
    }
    for(ll i = 0;i < mid+1;i++){
        if(d[i] < s){
            for(ll j = 0;j < m;j++)
                if(b[j] + d[i] <= s) sum = min(sum,(n-c[i])*a[j]);
        }
        else break;
    }
    for(ll j = 0;j < m;j++){
            if(b[j] <= s) sum = min(sum,n*a[j]);
    }
    printf("%I64d\n",sum);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{

   ll n,m,k,x,cost;
   while(cin>>n>>m>>k){
   cin>>x>>cost;
   ll a[100005],b[100005],c[100005],d[100005],f[10005];
   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];
   }
   vector<pair<ll,ll> > v;
   for(int i=1;i<=m;i++)
   {
       v.push_back(make_pair(b[i],a[i]));
   }
   sort(v.begin(),v.end());
   ll min1=1000000008;
   for(int i=0;i<m;i++)
   {
       if(v[i].second<min1)
       {
           min1=v[i].second;
           f[i]=min1;
       }
       else
        f[i]=f[i-1];
   }
   int j=m-1;
   c[0]=0;
   d[0]=0;
   ll ans=1000000008;
   for(int i=0;i<=n;i++)
   {
       while(j>=0&&v[j].first>cost-d[i])
       {
           j--;
       }
       if(j==-1)
       {
           if(cost-d[i]>=0)
           ans=min(ans,(n-c[i])*x);
       }
       else
       ans=min(ans,(n-c[i])*f[j]);
   }
   cout<<ans;
   }
    return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{

   ll n,m,k,x,cost;
   while(cin>>n>>m>>k){
   cin>>x>>cost;
   ll a[100005],b[100005],c[100005],d[100005],f[10005];
   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];
   }
   vector<pair<ll,ll> > v;
   for(int i=1;i<=m;i++)
   {
       v.push_back(make_pair(b[i],a[i]));
   }
   sort(v.begin(),v.end());
   ll min1=1000000008;
   for(int i=0;i<m;i++)
   {
       if(v[i].second<min1)
       {
           min1=v[i].second;
           f[i]=min1;
       }
       else
        f[i]=f[i-1];
   }
   int j=m-1;
   c[0]=0;
   d[0]=0;
   ll ans=1000000008;
   for(int i=0;i<=n;i++)
   {
       while(j>=0&&v[j].first>cost-d[i])
       {
           j--;
       }
       if(j==-1)
       {
           if(cost-d[i]>=0)
           ans=min(ans,(n-c[i])*x);
       }
       else
       ans=min(ans,(n-c[i])*f[j]);
   }
   cout<<ans;
   }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&d[i]);
    ll sum = x*(n-c[lower_bound(d+1,d+k+1,s)-d-1]);
    for(int i = 0;i < m;i++){
        if(b[i] > s) continue;
        else
            sum = min(sum,a[i]*(n-c[lower_bound(d+1,d+k+1,s-b[i])-d-1]));
    }
    printf("%I64d\n",sum);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    ll l = 0,r = k,mid;
    while(l < r){
        ll mid = (l+k)/2;
        if(d[mid] < s) r = mid,mid =  (r+l)/2;
        else l = mid,mid = (mid+r)/2;
    }
    for(ll i = 0;i < mid+1;i++){
        if(d[i] < s){
            for(ll j = 0;j < m;j++)
                if(b[j] + d[i] <= s) sum = min(sum,(n-c[i])*a[j]);
        }
        else break;
    }
    for(ll j = 0;j < m;j++){
            if(b[j] <= s) sum = min(sum,n*a[j]);
    }
    printf("%I64d\n",sum);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    for(ll i = 0;i < k;i++){
        if(d[i] < s){
            for(ll j = 0;j < m;j++)
                if(b[j] + d[i] <= s) sum = min(sum,(n-c[i])*a[j]);
        }
        else break;
    }
    for(ll j = 0;j < m;j++){
            if(b[j] <= s) sum = min(sum,n*a[j]);
    }
    printf("%I64d\n",sum);
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#define ll long long
using namespace std;

const int maxn=2e5+10;
ll t1[maxn],c1[maxn];
ll t2[maxn],c2[maxn];
ll ans=0;
ll n,m,k,x,s;

void solve(int now)
{
   	int l=1,r=k,mid;
   	while(l<=r)
   	{
   		mid=((l+r)>>1);
   		if(c2[mid]+c1[now]<=s){
   			ll mi=(n-t2[mid])*t1[now];
   			ans=min(ans,mi);
   			l=mid+1;
   		}
   		else r=mid-1;
   	}
}

int main()
{
	while(~scanf("%I64d%I64d%I64d",&n,&m,&k)){
	scanf("%I64d%I64d",&x,&s);
	ans=(ll)x*n;
	for(int i=1;i<=m;i++)  scanf("%I64d",&t1[i]);
	for(int i=1;i<=m;i++)  scanf("%I64d",&c1[i]);
    for(int i=1;i<=k;i++)  scanf("%I64d",&t2[i]);
    for(int i=1;i<=k;i++)  scanf("%I64d",&c2[i]);
    for(int i=k;i;i--)  if(c2[i]<=s) {
    	ans=min(ans,(ll)(n-t2[i])*x);
    	if(c2[i]==c2[i-1]) t2[i-1]=t2[i];
    }
	for(int i=1;i<=m;i++)
	  if(c1[i]<=s)  {ans=min(ans,(ll)t1[i]*n);solve(i);}
	cout<<ans<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&d[i]);
    ll sum = x*n;
    for(int i = 0;i < m;i++){
        if(b[i] > s) continue;
        else
            sum = min(sum,a[i]*(n-c[upper_bound(d+1,d+k+1,s-b[i])-d-1]));
    }
    printf("%I64d\n",sum);
    return 0;
}


#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<set>
#include<map>
#include<list>
#include<stack>
#include<queue>
#include<vector>
#include<string>
#include<iostream>
#include<algorithm>
using namespace std;
#define lson rt<<1
#define rson rt<<1|1
#define N 200010
#define M 100010
#define Mod 1000000007
#define LL long long
#define INF 0x7fffffff
#define FOR(i,f_start,f_end) for(int i=f_start;i<=f_end;i++)
#define For(i,f_start,f_end) for(int i=f_start;i<f_end;i++)
#define REP(i,f_end,f_start) for(int i=f_end;i>=f_start;i--)
#define Rep(i,f_end,f_start) for(int i=f_end;i>f_start;i--)
#define MT(x,i) memset(x,i,sizeof(x))
#define gcd(x,y) __gcd(x,y)
const double PI = acos(-1);

pair<LL, LL> v1[N];
pair<LL, LL> v2[N];

LL er(LL l, LL r, LL x)
{
  while(l<r)
  {
    LL mid = (l+r+1)/2;
    if(v2[mid].second<=x) l=mid;
    else r=mid-1;
  }
  return l;
}

int main()
{
  LL n, m1, m2, x, y;
  while(scanf("%I64d%I64d%I64d", &n, &m1, &m2)!=EOF)
  {
    scanf("%I64d%I64d", &x, &y);
    for(LL i=0; i<m1; i++)
    {
      scanf("%I64d", &v1[i].first);
    }
    for(LL i=0; i<m1; i++)
    {
      scanf("%I64d", &v1[i].second);
    }
    v2[0].first=0;
    v2[0].second=0;
    for(LL i=1; i<=m2; i++)
    {
      scanf("%I64d", &v2[i].first);
    }
    for(LL i=1; i<=m2; i++)
    {
      scanf("%I64d", &v2[i].second);
    }
    LL m=v2[0].first;
    for(LL i=1; i<=m2; i++)
    {
      v2[i].first=max(m, v2[i].first);
      m=v2[i].first;
    }
    LL l = er(0, m2, y);
    LL ans = (n-v2[l].first)*x;

    for(LL i=0; i<m1; i++)
    {
      if(y>=v1[i].second)
      {
        LL ty = y - v1[i].second;
        LL l = er(0, m2, ty);
        LL tmp = (n-v2[l].first) * v1[i].first;
        if(tmp<ans) ans=tmp;
      }
    }
    printf("%I64d\n", ans);
  }
  return 0;
}


#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<set>
#include<map>
#include<list>
#include<stack>
#include<queue>
#include<vector>
#include<string>
#include<iostream>
#include<algorithm>
using namespace std;
#define lson rt<<1
#define rson rt<<1|1
#define N 200010
#define M 100010
#define Mod 1000000007
#define LL long long
#define INF 0x7fffffff
#define FOR(i,f_start,f_end) for(int i=f_start;i<=f_end;i++)
#define For(i,f_start,f_end) for(int i=f_start;i<f_end;i++)
#define REP(i,f_end,f_start) for(int i=f_end;i>=f_start;i--)
#define Rep(i,f_end,f_start) for(int i=f_end;i>f_start;i--)
#define MT(x,i) memset(x,i,sizeof(x))
#define gcd(x,y) __gcd(x,y)
const double PI = acos(-1);

pair<LL, LL> v1[N];
pair<LL, LL> v2[N];

LL er(LL l, LL r, LL x)
{
  while(l<r)
  {
    LL mid = (l+r+1)/2;
    if(v2[mid].second<=x) l=mid;
    else r=mid-1;
  }
  return l;
}

int main()
{
  LL n, m1, m2, x, y;
  while(scanf("%I64d%I64d%I64d", &n, &m1, &m2)!=EOF)
  {
    scanf("%I64d%I64d", &x, &y);
    for(LL i=0; i<m1; i++)
    {
      scanf("%I64d", &v1[i].first);
    }
    for(LL i=0; i<m1; i++)
    {
      scanf("%I64d", &v1[i].second);
    }
    v2[0].first=0;
    v2[0].second=0;
    for(LL i=1; i<=m2; i++)
    {
      scanf("%I64d", &v2[i].first);
    }
    for(LL i=1; i<=m2; i++)
    {
      scanf("%I64d", &v2[i].second);
    }
    LL pre=-1;
    for(LL i=m2; i>=0; i--)
    {
      if(pre==-1);
      else if(pre==v2[i].second)
      {
        v2[i].first=v2[i+1].first;
      }
      pre=v2[i].second;
    }
    LL l = er(0, m2, y);
    LL ans = (n-v2[l].first)*x;

    for(LL i=0; i<m1; i++)
    {
      if(y>=v1[i].second)
      {
        LL ty = y - v1[i].second;
        LL l = er(0, m2, ty);
        LL tmp = (n-v2[l].first) * v1[i].first;
        if(tmp<ans) ans=tmp;
      }
    }
    printf("%I64d\n", ans);
  }
  return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    ll l = 0,r = k-1,mid;
    while(l < r){
        ll mid = (l+r)/2;
        if(d[mid] < s) l = mid,mid =  (r+l)/2;
        else if(d[mid] > s) r = mid,mid = (mid+r)/2;
        else break;
    }
    for(ll i = 0;i < mid+1;i++){
        if(d[i] < s){
            for(ll j = 0;j < m;j++)
                if(b[j] + d[i] <= s) sum = min(sum,(n-c[i])*a[j]);
        }
        else break;
    }
    for(ll j = 0;j < m;j++){
            if(b[j] <= s) sum = min(sum,n*a[j]);
    }
    printf("%I64d\n",sum);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200005],b[200005],c[200005],d[200005];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    for(ll i = 0;i < k;i++){
        if(d[i] <= s){
            for(ll j = 0;j < m;j++){
                if(b[j] + d[i] <= s){
                        if(c[i] <= n) sum = min(sum,(n-c[i])*a[j]);
                        else sum = min(sum,0ll);
                }
            }
        }
    }
    printf("%I64d\n",sum);
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <memory.h>
#include <stdio.h>
#include <sstream>
#include <deque>
const int pi=acos(-1);
typedef long long ll;
using namespace std;
map<int,int>d;
ll n,m,k,x,s;
ll ans,lel;
vector<int>v,a,temp;
vector<pair<int,int> >u;
int main(){
	cin>>n>>m>>k>>x>>s;
	while("%I64d%I64d%I64d%I64d%I64d",&n,&m,&k,&x,&s);{
	v.resize(m);
	a.resize(m);
	u.resize(k);
	for(int i=0;i<m;i++)
		scanf("%d",&v[i]);
	for(int i=0;i<m;i++)
		scanf("%d",&a[i]);
	for(int i=0;i<k;i++)
		scanf("%d",&u[i].second);
	for(int i=0;i<k;i++)
		scanf("%d",&u[i].first);
	sort(u.begin(),u.end());
	for(int i=1;i<k;i++)
		u[i].second=max(u[i].second,u[i-1].second);
	ans=x*n;
	for(int i=0;i<k;i++)
		d[u[i].first]=max(u[i].second,d[u[i].first]);
	temp.resize(k);
	for(int i=0;i<k;i++)
		temp[i]=u[i].first;
	for(int i=0;i<m;i++)
	{
		int left=s-a[i];
		if(left<0)
			continue;
		int y=upper_bound(temp.begin(),temp.end(),left)-temp.begin();
		--y;
		if(y<0)
		{
			lel=n*v[i];
			ans=min(ans,lel);
			continue;
		}
		lel=(n-d[temp[y]])*v[i];
		ans=min(ans,lel);
	}
	for(int i=0;i<k;i++)
		if(temp[i]<=s)
		{
			lel=(n-d[temp[i]])*x;
			ans=min(ans,lel);
		}
        printf("%I64d\n",ans);
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
using namespace std;
int main()
{
    ll n,m,k;
    while(cin>>n>>m>>k){
    ll s,x;
    cin>>s>>x;
    vector<ll> p1_1(m);
    for(ll i=0;i<m;i++) cin>>p1_1[i];
    vector<ll> p1_2(m);
    for(ll i=0;i<m;i++) cin>>p1_2[i];
    vector<ll> p2_1(k);
    for(ll i=0;i<k;i++) cin>>p2_1[i];
    vector<ll> p2_2(k);
    for(ll i=0;i<k;i++) cin>>p2_2[i];
    ll time_=n*s;
    for(ll i=0;i<m;i++)
    {
        if(x<p1_2[i])
            continue;
        ll money=x-p1_2[i];
        ll potions=n;
        ll index=upper_bound(p2_2.begin(),p2_2.end(),money)-p2_2.begin();
        index--;
        if(index>=0)
            potions-=p2_1[index];
        time_=min(time_,potions*p1_1[i]);
    }
    ll index=upper_bound(p2_2.begin(),p2_2.end(),x)-p2_2.begin();
    index--;
    if(index>=0)
    {
        ll potions=n-p2_1[index];
        time_=min(time_,potions*s);
    }
    cout<<time_<<endl;
    }
    return 0;
}


#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 2e5+10;
#define LL long long
LL a[maxn],b[maxn],c[maxn],d[maxn];
int main()
{
	LL n,m,k,x,s;
	while(scanf("%lld%lld%lld",&n,&m,&k)!=EOF)
	{
		scanf("%lld%lld",&x,&s);
		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=1;i<=k;++i)
			scanf("%lld",&c[i]);
		for(int i=1;i<=k;++i)
			scanf("%lld",&d[i]);
		LL ans =(n - c[upper_bound(d+1,d+k+1,s)-d-1]) * x; //数组下标从1开始，避免数组下标可能为-1
		for(int i=0;i<m;++i)
		{
			if(b[i]>s)
				continue;
			ans = min(ans, (n - c[upper_bound(d+1,d+k+1,s-b[i])-d-1]) * a[i]);
		}
		printf("%lld\n",ans);
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[2000010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    for(ll i = 0;i < k;i++){
        if(d[i] < s){
            for(ll j = 0;j < m;j++)
                if(b[j] + d[i] <= s) sum = min(sum,(n-c[i])*a[j]);
        }
        else break;
    }
    printf("%I64d\n",sum);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    for(ll i = k-1;i >= 0;i--){
        if(d[i] < s){
            for(ll j = 0;j < m;j++)
                if(b[j] + d[i] <= s) sum = min(sum,(n-c[i])*a[j]);
        }
        else break;
    }
    for(ll j = 0;j < m;j++){
            if(b[j] <= s) sum = min(sum,n*a[j]);
    }
    printf("%I64d\n",sum);
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&d[i]);
    ll sum = (n - c[upper_bound(d+1,d+k+1,s)-d-1])*x;
    for(ll i = 0;i < m;i++){
        if(b[i] <= s) sum = min(sum,(n - c[upper_bound(d+1,d+k+1,s)-d-1])*a[i]);
    }
    printf("%I64d\n",sum);
    return 0;
}


#include<bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
using namespace std;
int main()
{
    ll n,m,k;
    while(~scanf("%d%d%d",&n,&m,&k))
    {
        ll s,x;
        scanf("%d%d",&s,&x);
        vector<ll> p1_1(m);
        for(ll i=0; i<m; i++) scanf("%d",&p1_1[i]);
        vector<ll> p1_2(m);
        for(ll i=0; i<m; i++) scanf("%d",&p1_2[i]);
        vector<ll> p2_1(k);
        for(ll i=0; i<k; i++) scanf("%d",&p2_1[i]);
        vector<ll> p2_2(k);
        for(ll i=0; i<k; i++) scanf("%d",&p2_2[i]);
        ll time_=n*s;
        for(ll i=0; i<m; i++)
        {
            if(x<p1_2[i])
                continue;
            ll money=x-p1_2[i];
            ll potions=n;
            ll index=upper_bound(p2_2.begin(),p2_2.end(),money)-p2_2.begin();
            index--;
            if(index>=0)
                potions-=p2_1[index];
            time_=min(time_,potions*p1_1[i]);
        }
        ll index=upper_bound(p2_2.begin(),p2_2.end(),x)-p2_2.begin();
        index--;
        if(index>=0)
        {
            ll potions=n-p2_1[index];
            time_=min(time_,potions*s);
        }
        printf("%d\n",time_);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200005],b[200005],c[200005],d[200005];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 0;i < k;i++)
        scanf("%I64d",&d[i]);
    ll sum = n*x;
    for(ll i = k-1;i >= 0;i--){
        if(d[i] <= s){
            for(ll j = 0;j < m;j++){
                if(b[j] + d[i] <= s&&c[i] < n) sum = min(sum,(n-c[i])*a[j]);
            }
        }
    }
    printf("%I64d\n",sum);
    return 0;
}


#include<bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
using namespace std;
int main()
{
    ll n,m,k;
    while(~scanf("%I64d%I64d%I64d",&n,&m,&k))
    {
        ll s,x;
        scanf("%I64d%I64d",&s,&x);
        vector<ll> p1_1(m);
        for(ll i=0; i<m; i++) scanf("%I64d",&p1_1[i]);
        vector<ll> p1_2(m);
        for(ll i=0; i<m; i++) scanf("%I64d",&p1_2[i]);
        vector<ll> p2_1(k);
        for(ll i=0; i<k; i++) scanf("%I64d",&p2_1[i]);
        vector<ll> p2_2(k);
        for(ll i=0; i<k; i++) scanf("%I64d",&p2_2[i]);
        ll time_=n*s;
        for(ll i=0; i<m; i++)
        {
            if(x<p1_2[i])
                continue;
            ll money=x-p1_2[i];
            ll potions=n;
            ll index=upper_bound(p2_2.begin(),p2_2.end(),money)-p2_2.begin();
            index--;
            if(index>=0)
                potions-=p2_1[index];
            time_=min(time_,potions*p1_1[i]);
        }
        ll index=upper_bound(p2_2.begin(),p2_2.end(),x)-p2_2.begin();
        index--;
        if(index>=0)
        {
            ll potions=n-p2_1[index];
            time_=min(time_,potions*s);
        }
        printf("%I64d\n",time_);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef __int64 ll;
ll n,m,k,x,s,a[200010],b[200010],c[200010],d[200010];

int main(){
    scanf("%I64d%I64d%I64d",&n,&m,&k);
    scanf("%I64d%I64d",&x,&s);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    memset(d,0,sizeof(d));
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&a[i]);
    for(ll i = 0;i < m;i++)
        scanf("%I64d",&b[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&c[i]);
    for(ll i = 1;i <= k;i++)
        scanf("%I64d",&d[i]);
    ll sum = (n - c[upper_bound(d+1,d+k+1,s)-d-1])*x;
    for(ll i = 0;i < m;i++){
        if(b[i] <= s) sum = min(sum,(n - c[upper_bound(d+1,d+k+1,s-b[i])-d-1])*a[i]);
        else continue;
    }
    printf("%I64d\n",sum);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
int n,m,k;
cin>>n>>m>>k;
int x,s;
cin>>x>>s;
int a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<ii> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
int arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans = n*x;
f(i,k) {
    int b1 = s-d[i];
    if(b1 < 0) continue;
    int n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    // cout << it << endl;
    it--;
    // while(it>=0 && b[it] > b1) it--;
    if(it>=0) {
        int a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }
    ans = min(ans,(ll)n1*x);
}
ans = min(ans,(ll)(x*n));
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
ll n,m,k;
cin>>n>>m>>k;
ll x,s;
cin>>x>>s;
ll a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<pll> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
ll arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans = n*x;
f(i,k) {
    ll b1 = s-d[i];
    if(b1 < 0) continue;
    ll n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    // cout << it << endl;
    it--;
    // while(it>=0 && b[it] > b1) it--;
    if(it>=0) {
        ll a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }
    ans = min(ans,(ll)n1*x);
}
ans = max(ans,(ll)0);
for(int i=0;i<m;i++) {
    ans = min(ans,n*a[i]);
}
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
ll n,m,k;
cin>>n>>m>>k;
ll x,s;
cin>>x>>s;
ll a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<pll> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
ll arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans = n*x;
f(i,k) {
    ll b1 = s-d[i];
    if(b1 < 0) continue;
    ll n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    // cout << it << endl;
    it--;
    // while(it>=0 && b[it] > b1) it--;
    if(it>=0) {
        ll a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }
    ans = min(ans,(ll)n1*x);
}
ans = max(ans,(ll)0);
for(int i=0;i<m;i++) {
    if(s>=b[i])
    ans = min(ans,n*a[i]);
}
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
int n,m,k;
cin>>n>>m>>k;
int x,s;
cin>>x>>s;
int a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<ii> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
int arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans = n*x;
f(i,k) {
    int b1 = s-d[i];
    if(b1 < 0) continue;
    int n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    // cout << it << endl;
    it--;
    // while(it>=0 && b[it] > b1) it--;
    if(it>=0) {
        int a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }
    ans = min(ans,(ll)n1*x);
}
ans = max(ans,(ll)0);
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
int n,m,k;
cin>>n>>m>>k;
int x,s;
cin>>x>>s;
int a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<ii> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
int arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans;
f(i,k) {
    int b1 = s-d[i];
    if(b1 < 0) continue;
    int n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    while(b[it] > b1) it--;
    if(it>=0) {
        int a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }
    ans = min(ans,(ll)n1*x);
}
ans = min(ans,(ll)(x*n));
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
int n,m,k;
cin>>n>>m>>k;
int x,s;
cin>>x>>s;
int a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<ii> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
int arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans = n*x;
f(i,k) {
    int b1 = s-d[i];
    if(b1 < 0) continue;
    int n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    cout << it << endl;
    it--;
    while(b[it] > b1 && it>=0) it--;
    if(it>=0) {
        int a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }
    ans = min(ans,(ll)n1*x);
}
ans = min(ans,(ll)(x*n));
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
int n,m,k;
cin>>n>>m>>k;
int x,s;
cin>>x>>s;
int a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<ii> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
int arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans = n*x;
f(i,k) {
    int b1 = s-d[i];
    if(b1 < 0) continue;
    int n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    it--;
    while(b[it] > b1) it--;
    if(it>=0) {
        int a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }
    ans = min(ans,(ll)n1*x);
}
ans = min(ans,(ll)(x*n));
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
int n,m,k;
cin>>n>>m>>k;
int x,s;
cin>>x>>s;
int a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<ii> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
int arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans;
f(i,k) {
    int b1 = s-d[i];
    if(b1 < 0) continue;
    int n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    while(b[it] > b1) it--;
    if(it>=0) {
        int a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }

}
ans = min(ans,(ll)(x*n));
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
int n,m,k;
cin>>n>>m>>k;
int x,s;
cin>>x>>s;
int a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<ii> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
int arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans;
f(i,k) {
    int b1 = s-d[i];
    int n1 = n-c[i];
    auto it = upper_bound(b,b+m,b1) - b;
    while(b[it] > b1) it--;
    if(it>=0) {
        int a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }

}
ans = min(ans,(ll)(x*n));
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
ll n,m,k;
cin>>n>>m>>k;
ll x,s;
cin>>x>>s;
ll a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<pll> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
ll arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans = n*x;
f(i,k) {
    ll b1 = s-d[i];
    if(b1 < 0) continue;
    ll n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    // cout << it << endl;
    it--;
    // while(it>=0 && b[it] > b1) it--;
    if(it>=0) {
        ll a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }
    ans = min(ans,(ll)n1*x);
}
ans = max(ans,(ll)0);
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
int n,m,k;
cin>>n>>m>>k;
int x,s;
cin>>x>>s;
int a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<ii> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
int arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans = n*x;
f(i,k) {
    int b1 = s-d[i];
    if(b1 < 0) continue;
    int n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    cout << it << endl;
    it--;
    // while(b[it] > b1 && it>=0) it--;
    if(it>=0) {
        int a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }
    ans = min(ans,(ll)n1*x);
}
ans = min(ans,(ll)(x*n));
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
int n,m,k;
cin>>n>>m>>k;
int x,s;
cin>>x>>s;
int a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<ii> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
int arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans = n*x;
f(i,k) {
    int b1 = s-d[i];
    if(b1 < 0) continue;
    int n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    // cout << it << endl;
    it--;
    // while(it>=0 && b[it] > b1) it--;
    if(it>=0) {
        int a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }
    ans = min(ans,(ll)n1*x);
}
ans = max(ans,0);
cout << ans << endl;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define sc(a) scanf("%d",&a)
#define pf(a) printf("%d",a)
#define sc1(a) scanf("%lld",&a)
#define pf1(a) printf("%lld",a)
#define sc2(a) scanf("%d %d",&a.first,&a.second)
#define br printf("\n")
#define sp printf(" ")
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define f(i,n) for(int i=0;i<n;i++)
#define f1(i,st,n) for(int i=st;i<n;i++)
#define f2(i,j,n,m) f(i,n) f(j,m)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define RESET(a,val) memset(a,val,sizeof(a))
#define mod 1000000007
#define mod1 1000000009
#define oo 1000000000
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pll> vll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
int main(){
int n,m,k;
cin>>n>>m>>k;
int x,s;
cin>>x>>s;
int a[m],b[m],c[k],d[k];
f(i,m) cin>>a[i];
f(i,m) cin>>b[i];
f(i,k) cin>>c[i];
f(i,k) cin>>d[i];
vector<ii> x1(m);
f(i,m) x1[i] = ii(b[i],a[i]);
sort(x1.begin(),x1.end());
f(i,m) b[i] = x1[i].ff;
f(i,m) a[i] = x1[i].ss;
int arr[m];
arr[0] = a[0];
for(int i=1;i<m;i++) {
    arr[i] = min(a[i],arr[i-1]);
}
ll ans = n*x;
f(i,k) {
    int b1 = s-d[i];
    if(b1 < 0) continue;
    int n1 = n-c[i];
    if(n1<=0 && b1>=0) {
        ans = 0;
        break;
    }
    auto it = upper_bound(b,b+m,b1) - b;
    while(b[it] > b1) it--;
    if(it>=0) {
        int a1 = arr[it];
        ans = min(min(ans,(ll)(n1*a1)),(ll)n1*x);
    }
    ans = min(ans,(ll)n1*x);
}
ans = min(ans,(ll)(x*n));
cout << ans << endl;
return 0;
}


#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(d[r]==s && c[r]==n)
    {
        cout << "0";
        return 0;
    }
    else if(d[r]==s && c[r]<n)
    {
        r--;
    }

    if(r>=1){

    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].second<s)
           ans = min(ans , 1ll*p[i].first*n);
        else
            break;
    }
    r--;
    }

    cout << ans << endl;
}


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

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

    while(l<=r)
    {
        int 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;

    int 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 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<=n ; i++)
        {
            if(p[i].first<s)
            {
                ans = min(ans , 1ll*p[i].second*n);
            }
            else
            {
                break;
            }
        }
        cout << ans;
        return 0;
    }

    else if(p[1].first>s && d[1]<s)
    {

    }

    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--;
    }
    long long remainpotion = n - c[r];
    long long remainpoints = s - d[r];

    ans = 1ll*remainpotion*x;

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

    }
}


#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]<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] ,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++)
        {
            if(d[i]<=s)
            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 , 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(int i = 1 ; i<=m ; i++)
        {
            if(b[i]<s)
            {
                ans = min(ans , 1ll*a[i]*n);
            }
            else
            {
                break;
            }
        }
        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 , 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;

    for(int i = 0 ; 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  a[maxn] , b[maxn] , c[maxn] , d[maxn];
  int n , m , k;

int  smalld(int x)
{
    int l = 1 , r=k;

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

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

int main()
{

    cin >> n >>  m >> k;

    int 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*a[i]*(n-c[(smalld(s-b[i]))]));
    }

    cout << ans;

}


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

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

    while(l<=r)
    {
        int 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;

    int 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*a[i]*(n-c[(smalld(s-b[i]))]));
    }

    cout << ans;

}