/*Greedy解法*/

#include<iostream>
#include<vector>
#include<algorithm>
#include<set>

using namespace std;
using ll = long long;

void input(vector<ll>& X) {
	for (int i = 0; i < X.size(); i++) {
		cin >> X.at(i);
	}
}

pair<ll, ll> h(ll x, vector<ll> G, vector<ll> H) {
	if (x == 0) {
		if (find(G.begin(), G.end(), 0) != G.end()) {
			return make_pair(0, H[0]);
		}
		else {
			return make_pair(G[0], 0);
		}
	}

	set<ll> F(H.begin(), H.end());
	for (auto g : G) {
		if (g == 0) continue;

		if (x % g == 0 && F.count(x / g)) {
			return make_pair(g, x / g);
		}
	}
	return make_pair(-1, -1);
}


int main() {
	ll K, L, M, N, S, T;
	cin >> K >> L >> M >> N >> S;

	vector<ll> A(K), B(L), C(M), D(N);
	vector<ll> U(0), V(0), E(0);

	input(A); input(B); input(C); input(D);
	for (auto a : A) {
		for (auto b : B) {
			U.push_back(a * b);
		}
	}

	for (auto c : C) {
		for (auto d : D) {
			V.push_back(c * d);
		}
	}

	for (auto u : U) {
		for (auto v : V) {
			E.push_back(u * v);
		}
	}

	sort(E.begin(), E.end());
	T = E[S - 1];

	ll alpha, beta, a, b, c, d;
	pair<ll, ll> P;

	P = h(T, U, V);
	alpha = P.first; beta = P.second;

	P = h(alpha, A, B);
	a = P.first; b = P.second;

	P = h(beta, C, D);
	c = P.first; d = P.second;

	cout << T << endl;
	cout << a << " " << b << " " << c << " " << d << endl;
	return 0;
}