#include <iostream>
#include <cstring>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <cmath>
#include <map>
#include <algorithm>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <unordered_map>
#include <unordered_set>
using namespace std;
typedef long long LL;
const int maxn = 4e4 + 10;
const int inf = 0x3f3f3f3f;
const LL INF = 9223372036854775807;
const double efs = 1e-9;
const int mod = 1000000007;
int a[maxn];
int b[maxn];
int aa[maxn];
int bb[maxn];
int main()
{
    int n, m, k;
    set <pair<int, int>> st;
    multiset <int> st1, st2;
    int cnt1 = 0, cnt2 = 0;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    for(int i = 1; i <= m; i++) {
        cin >> b[i];
    }
    int tmp = 0;
    for(int i = 1; i <= n; i++) {
        if(a[i] == 1) tmp++;
        else{
            st1.insert(tmp);
            tmp = 0;
        }
    }
    st1.insert(tmp);
    tmp = 0;
    for(int i = 1; i <= m; i++) {
        if(b[i] == 1) tmp++;
        else{
            st2.insert(tmp);
            tmp = 0;
        }
    }
    st2.insert(tmp);
    for(int i = 1; i <= sqrt(k); i++) {
        if(k % i == 0) {
            st.insert(make_pair(i, k / i));
            st.insert(make_pair(k / i, i));
        }
    }
    LL ans = 0;
    set <pair<int, int>> :: iterator it;
    multiset <int> :: iterator it1, it2, it3, it4;
    for(it = st.begin(); it != st.end(); it++) {
        it1 = st1.lower_bound(it -> first);
        it2 = st2.lower_bound(it -> second);
        if(it1 == st1.end() || it2 == st2.end()) continue;
        LL tmp = 0;
        for(it4 = it2; it4 != st2.end(); it4++) {
            tmp += (*it4 - it -> second + 1);
        }
        for(it3 = it1; it3 != st1.end(); it3++) {
            ans += tmp * (*it3 - it -> first + 1);
        }
    }
    cout << ans << endl;
    return 0;
}


#include <iostream>
#include <cstring>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <cmath>
#include <map>
#include <algorithm>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <unordered_map>
#include <unordered_set>
using namespace std;
typedef long long LL;
const int maxn = 4e4 + 10;
const int inf = 0x3f3f3f3f;
const LL INF = 9223372036854775807;
const double efs = 1e-9;
const int mod = 1000000007;
int a[maxn];
int b[maxn];
int aa[maxn];
int bb[maxn];
int main()
{
    int n, m, k;
    set <pair<int, int>> st;
    int cnt1 = 0, cnt2 = 0;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    for(int i = 1; i <= m; i++) {
        cin >> b[i];
    }
    int tmp = 0;
    for(int i = 1; i <= n; i++) {
        if(a[i] == 1) tmp++;
        else{
            aa[cnt1++] = tmp;
            tmp = 0;
        }
    }
    aa[cnt1++] = tmp;
    tmp = 0;
    for(int i = 1; i <= m; i++) {
        if(b[i] == 1) tmp++;
        else{
            bb[cnt2++] = tmp;
            tmp = 0;
        }
    }
    bb[cnt2++] = tmp;
    for(int i = 1; i <= sqrt(k); i++) {
        if(k % i == 0) {
            st.insert(make_pair(i, k / i));
            st.insert(make_pair(k / i, i));
        }
    }
    LL ans = 0;
    set <pair<int, int>> :: iterator it;
    for(it = st.begin(); it != st.end(); it++) {
        for(int i = 0; i < cnt1; i++) {
            for(int j = 0; j < cnt2; j++) {
                if(aa[i] >= it -> first && bb[j] >= it -> second) {
                    ans += (aa[i] - it -> first + 1) * (bb[j] - it -> second + 1);
                }
            }
        }
    }
    cout << ans << endl;
    return 0;
}


#include <iostream>
#include <cstring>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <cmath>
#include <map>
#include <algorithm>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <unordered_map>
#include <unordered_set>
using namespace std;
typedef long long LL;
const int maxn = 4e4 + 10;
const int inf = 0x3f3f3f3f;
const LL INF = 9223372036854775807;
const double efs = 1e-9;
const int mod = 1000000007;
int a[maxn];
int b[maxn];
int aa[maxn];
int bb[maxn];
int main()
{
    int n, m, k;
    vector <pair<int, int>> vt;
    multiset <int> st1, st2;
    int cnt1 = 0, cnt2 = 0;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    for(int i = 1; i <= m; i++) {
        cin >> b[i];
    }
    int tmp = 0;
    for(int i = 1; i <= n; i++) {
        if(a[i] == 1) tmp++;
        else{
            st1.insert(tmp);
            tmp = 0;
        }
    }
    st1.insert(tmp);
    tmp = 0;
    for(int i = 1; i <= m; i++) {
        if(b[i] == 1) tmp++;
        else{
            st2.insert(tmp);
            tmp = 0;
        }
    }
    st2.insert(tmp);
    for(int i = 1; i <= sqrt(k); i++) {
        if(k % i == 0) {
            vt.push_back(make_pair(i, k / i));
            if(i != k / i)
            vt.push_back(make_pair(k / i, i));
        }
    }
    LL ans = 0;
    vector <pair<int, int>> :: iterator it;
    multiset <int> :: iterator it1, it2, it3, it4;
    for(it = vt.begin(); it != vt.end(); it++) {
        it1 = st1.lower_bound(it -> first);
        it2 = st2.lower_bound(it -> second);
        for(it3 = it1; it3 != st1.end(); it3++) {
            for(it4 = it2; it4 != st2.end(); it4++) {
                ans += (*it3 - it -> first + 1) * (*it4 - it -> second + 1);
            }
        }
    }
    cout << ans << endl;
    return 0;
}


#include <iostream>
#include <cstring>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <cmath>
#include <map>
#include <algorithm>
#include <string>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <unordered_map>
#include <unordered_set>
using namespace std;
typedef long long LL;
const int maxn = 4e4 + 10;
const int inf = 0x3f3f3f3f;
const LL INF = 9223372036854775807;
const double efs = 1e-9;
const int mod = 1000000007;
int a[maxn];
int b[maxn];
int aa[maxn];
int bb[maxn];
int main()
{
    int n, m, k;
    set <pair<int, int>> st;
    multiset <int> st1, st2;
    int cnt1 = 0, cnt2 = 0;
    cin >> n >> m >> k;
    for(int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    for(int i = 1; i <= m; i++) {
        cin >> b[i];
    }
    int tmp = 0;
    for(int i = 1; i <= n; i++) {
        if(a[i] == 1) tmp++;
        else{
            st1.insert(tmp);
            tmp = 0;
        }
    }
    st1.insert(tmp);
    tmp = 0;
    for(int i = 1; i <= m; i++) {
        if(b[i] == 1) tmp++;
        else{
            st2.insert(tmp);
            tmp = 0;
        }
    }
    st2.insert(tmp);
    for(int i = 1; i <= sqrt(k); i++) {
        if(k % i == 0) {
            st.insert(make_pair(i, k / i));
            st.insert(make_pair(k / i, i));
        }
    }
    LL ans = 0;
    set <pair<int, int>> :: iterator it;
    multiset <int> :: iterator it1, it2, it3, it4;
    for(it = st.begin(); it != st.end(); it++) {
        it1 = st1.lower_bound(it -> first);
        it2 = st2.lower_bound(it -> second);
        for(it3 = it1; it3 != st1.end(); it3++) {
            for(it4 = it2; it4 != st2.end(); it4++) {
                ans += (*it3 - it -> first + 1) * (*it4 - it -> second + 1);
            }
        }
    }
    cout << ans << endl;
    return 0;
}


#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <unordered_map>
#include <map>
#include <set>
#include <algorithm>
#include <string.h>
using namespace std;

#define MAX 50000
long long brr[MAX], arr[MAX];
long long ynt[MAX], xnt[MAX];
long long n, m, k;
long long res;
vector <pair<int, int> > v;

int main() {
	cin >> n >> m >> k;
	int x, y;
	for (int i = 1; i <= n; i++) {
		cin >> y;
		if (y == 1) {
			arr[i] = arr[i - 1] + 1;
			ynt[arr[i]]++;
		}
		else
			arr[i] = 0;
	}
	for (int i = 1; i <= m; i++) {
		cin >> x;
		if (x == 1) {
			brr[i] = brr[i - 1] + 1;
			xnt[brr[i]]++;
		}
		else
			brr[i] = 0;
	}
	for (int i = n; i >= 1; i--) {
		ynt[i] += ynt[i + 1];
	}
	for (int i = m; i >= 1; i--) {
		xnt[i] += xnt[i + 1];
	}
	for (long long i = 1; i * i <= k; i++) {
		if (k%i == 0) {
			v.push_back(make_pair(i, k / i));
			if (i*i != k)v.push_back(make_pair(k / i, i));
		}
	}
	for (int i = 0; i < v.size(); i++) {
		//cout << v[i].first << " " << v[i].second << endl;
		//cout << ynt[v[i].first] << " " << xnt[v[i].second] << endl;
		res += (ynt[v[i].first] * xnt[v[i].second]);
	}
	cout << res;
}


#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <unordered_map>
#include <map>
#include <set>
#include <algorithm>
#include <string.h>
using namespace std;

#define MAX 50000
long long nrr[MAX], mrr[MAX];
long long brr[MAX], arr[MAX];
long long ynt[MAX], xnt[MAX];
long long n, m, k;
long long res;
vector <pair<int, int> > v;

int main() {
	cin >> n >> m >> k;
	for (int i = 1; i <= n; i++) {
		cin >> nrr[i];
		if (nrr[i] == 1) {
			arr[i] = arr[i - 1] + 1;
			ynt[arr[i]]++;
		}
		else
			arr[i] = 0;
	}
	for (int i = 1; i <= m; i++) {
		cin >> mrr[i];
		if (mrr[i] == 1) {
			brr[i] = brr[i - 1] + 1;
			xnt[brr[i]]++;
		}
		else
			brr[i] = 0;
	}
	for (int i = n; i >= 1; i--) {
		ynt[i] += ynt[i + 1];
	}
	for (int i = m; i >= 1; i--) {
		xnt[i] += xnt[i + 1];
	}
	for (int i = 1; i * i <= k; i++) {
		if (k%i == 0) {
			v.push_back(make_pair(i, k / i));
			if (i*i != k)v.push_back(make_pair(k / i, i));
		}
	}
	for (int i = 0; i < v.size(); i++) {
		//cout << v[i].first << " " << v[i].second << endl;
		//cout << ynt[v[i].first] << " " << xnt[v[i].second] << endl;
		res += (ynt[v[i].first] * xnt[v[i].second]);
	}
	cout << res;
}


#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <unordered_map>
#include <map>
#include <set>
#include <algorithm>
#include <string.h>
using namespace std;

#define MAX 50000
long long brr[MAX], arr[MAX];
long long ynt[MAX], xnt[MAX];
long long n, m, k;
long long res;
vector <pair<long, long> > v;

int main() {
	cin >> n >> m >> k;
	int x, y;
	for (int i = 1; i <= n; i++) {
		cin >> y;
		if (y == 1) {
			arr[i] = arr[i - 1] + 1;
			ynt[arr[i]]++;
		}
		else
			arr[i] = 0;
	}
	for (int i = 1; i <= m; i++) {
		cin >> x;
		if (x == 1) {
			brr[i] = brr[i - 1] + 1;
			xnt[brr[i]]++;
		}
		else
			brr[i] = 0;
	}
	for (int i = n; i >= 1; i--) {
		ynt[i] += ynt[i + 1];
	}
	for (int i = m; i >= 1; i--) {
		xnt[i] += xnt[i + 1];
	}
	for (long long i = 1; i * i <= k; i++) {
		if (i * i == k) {
			v.push_back(make_pair(i, i));
		}
		else if (k%i == 0) {
			long long p = k / i;
			v.push_back(make_pair(i, p));
			v.push_back(make_pair(p, i));
		}
	}
	for (int i = 0; i < v.size(); i++) {
		//cout << v[i].first << " " << v[i].second << endl;
		//cout << ynt[v[i].first] << " " << xnt[v[i].second] << endl;
		res += (ynt[v[i].first] * xnt[v[i].second]);
	}
	cout << res;
}


#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <unordered_map>
#include <map>
#include <set>
#include <algorithm>
#include <string.h>
using namespace std;

#define MAX 40001
int nrr[MAX], mrr[MAX];
int brr[MAX], arr[MAX];
int ynt[MAX], xnt[MAX];
int n, m, k;
long long res;
vector <pair<int, int> > v;

int main() {
	cin >> n >> m >> k;
	for (int i = 1; i <= n; i++) {
		cin >> nrr[i];
		if (nrr[i] == 1) {
			arr[i] = arr[i - 1] + 1;
			ynt[arr[i]]++;
		}
		else
			arr[i] = 0;
	}
	for (int i = 1; i <= m; i++) {
		cin >> mrr[i];
		if (mrr[i] == 1) {
			brr[i] = brr[i - 1] + 1;
			xnt[brr[i]]++;
		}
		else
			brr[i] = 0;
	}
	for (int i = 1; i <= n; i++) {
		for (int j = i + 1; j <= n; j++)
			ynt[i] += ynt[j];
	}
	for (int i = 1; i <= m; i++) {
		for (int j = i + 1; j <= m; j++) {
			xnt[i] += xnt[j];
		}
	}
	for (int i = 1; i <= k; i++) {
		if (k%i == 0)
			v.push_back(make_pair(i, k / i));
	}
	for (int i = 0; i < v.size(); i++) {
		//cout << v[i].first << " " << v[i].second << endl;
		//cout << ynt[v[i].first] << " " << xnt[v[i].second] << endl;
		res += (ynt[v[i].first] * xnt[v[i].second]);
	}
	cout << res;
}


#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <unordered_map>
#include <map>
#include <set>
#include <algorithm>
#include <string.h>
using namespace std;

#define MAX 50000
long long brr[MAX], arr[MAX];
long long ynt[MAX], xnt[MAX];
long long n, m, k;
long long res;
vector <pair<int, int> > v;

int main() {
	cin >> n >> m >> k;
	int x, y;
	for (int i = 1; i <= n; i++) {
		cin >> y;
		if (y == 1) {
			arr[i] = arr[i - 1] + 1;
			ynt[arr[i]]++;
		}
		else
			arr[i] = 0;
	}
	for (int i = 1; i <= m; i++) {
		cin >> x;
		if (x == 1) {
			brr[i] = brr[i - 1] + 1;
			xnt[brr[i]]++;
		}
		else
			brr[i] = 0;
	}
	for (int i = n; i >= 1; i--) {
		ynt[i] += ynt[i + 1];
	}
	for (int i = m; i >= 1; i--) {
		xnt[i] += xnt[i + 1];
	}
	for (int i = 1; i * i <= k; i++) {
		if (k%i == 0) {
			v.push_back(make_pair(i, k / i));
			if (i*i != k)v.push_back(make_pair(k / i, i));
		}
	}
	for (int i = 0; i < v.size(); i++) {
		//cout << v[i].first << " " << v[i].second << endl;
		//cout << ynt[v[i].first] << " " << xnt[v[i].second] << endl;
		res += (ynt[v[i].first] * xnt[v[i].second]);
	}
	cout << res;
}


///God help me.
///Created by Al-amin.
///Time : 2018-07-30-22.15

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    vector<long long>num;
    cin >> n;
    for(int i = 0; i<2*n; i++){
        long long p; cin >> p;
        num.push_back(p);
    }
    sort(num.begin(), num.end());
    long long ans = (num[n-1]-num[0])*(num[2*n-1]-num[n]);
    for(int i = 1; i<n; i++){
        ans = min(ans , (num[n+i-1]-num[i])*(num[2*n-1]-num[0]));
    }
    cout << ans << endl;
    return 0;
}


///God help me
///Created by Al-amin
#include<bits/stdc++.h>

using namespace std;

#define ll long long

ll arr[200100];
ll ans = 9e18;
int n;
vector<ll>cv;
map<int,int>mp;

int main()
{
    scanf("%d",&n);
    for(int i = 0; i<n; i++){
        ll u , v; cin >> u >> v;
        cv.push_back(u);
        cv.push_back(v);
        mp[u]++;
        mp[v]++;
        if(mp[u] >= n  || mp[v] >= n){
            cout << 0 << endl;
        }
    }
    sort(cv.begin(),cv.end());
    cout << (cv[n-1]-cv[0])*(cv[2*n-1]-cv[n]) << endl;
    return 0;
}


///God help me
///Created by Al-amin
#include<bits/stdc++.h>

using namespace std;

#define ll long long

ll arr[200100];
ll ans = 9e18;
int n;

int main()
{
    scanf("%d",&n);
    for(int i = 0; i<2*n; i++){
        scanf("%lld",&arr[i]);
    }
    int p = 2*n;
    sort(arr,arr+p);
    for(int i = 0; i<2*n-3; i++){
        ll a = abs(arr[i]-arr[i+2]);
        ll b = abs(arr[i+1] - arr[i+3]);
        ans = min(a*b,ans);
    }
    cout << ans << endl;
    return 0;
}


///God help me
///Created by Al-amin
#include<bits/stdc++.h>

using namespace std;

#define ll long long

ll arr[200100];
ll ans = 9e18;
int n;
vector<pair<ll,ll> >cv;
vector<pair<ll,ll> >cv2;
bool com(pair<ll,ll>a , pair<ll,ll>b){
    if(a.first < b.first)return true;
    if(a.first == b.first and a.second < b.second)return true;
    else return false;
}

int main()
{
    scanf("%d",&n);
    for(int i = 0; i<n; i++){
        ll u , v; scanf("%lld%lld",&u,&v);
        if(u>v)swap(u,v);
        cv.push_back({u,v});
        cv2.push_back({v,u});
    }
    sort(cv.begin(),cv.end(),com);
    sort(cv2.begin(),cv2.end(),com);
    ll mnx = 9e18, mny = 9e18, mxx = 0, mxy = 0;
    for(int i = 0; i<n; i++){
        mnx = min(mnx,cv[i].first);
        mny = min(mny,cv[i].second);
        mxx = max(mxx,cv[i].first);
        mxy = max(mxy,cv[i].second);
    }
    //cout << mnx << " " << mny
    ll ans1 = (mxx-mnx)*(mxy-mny);
    mnx = 9e18, mny = 9e18, mxx = 0, mxy = 0;
    for(int i = 0; i<n; i++){
        mnx = min(mnx,cv2[i].first);
        mny = min(mny,cv2[i].second);
        mxx = max(mxx,cv2[i].first);
        mxy = max(mxy,cv2[i].second);
    }
    ll ans2 = (mxx-mnx)*(mxy-mny);
    cout << min(ans2,ans1) << endl;
    return 0;
}


///God help me
///Created by Al-amin
#include<bits/stdc++.h>

using namespace std;

#define ll long long

ll arr[200100];
ll ans = 9e18;
int n;
vector<pair<ll,ll> >cv;
bool com(pair<ll,ll>a , pair<ll,ll>b){
    if(a.first < b.first)return true;
    if(a.first == b.first and a.second < b.second)return true;
    else return false;
}

int main()
{
    scanf("%d",&n);
    for(int i = 0; i<n; i++){
        ll u , v; scanf("%lld%lld",&u,&v);
        if(u>v)swap(u,v);
        cv.push_back({u,v});
    }
    sort(cv.begin(),cv.end(),com);
    ll mnx = 9e18, mny = 9e18, mxx = 0, mxy = 0;
    for(int i = 0; i<n; i++){
        mnx = min(mnx,cv[i].first);
        mny = min(mny,cv[i].second);
        mxx = max(mxx,cv[i].first);
        mxy = max(mxy,cv[i].second);
    }
    //cout << mnx << " " << mny
    cout << (mxx-mnx)*(mxy-mny) << endl;
    return 0;
}


///God help me
///Created by Al-amin
#include<bits/stdc++.h>

using namespace std;

#define ll long long

ll arr[200100];
ll ans = 9e18;
int n;
vector<ll>cv;
map<int,int>mp;

int main()
{
    scanf("%d",&n);
    for(int i = 0; i<n; i++){
        ll u , v; cin >> u >> v;
        cv.push_back(u);
        cv.push_back(v);
        mp[u]++;
        mp[v]++;
        if(mp[u] >= n  || mp[v] >= n){
            cout << 0 << endl;
            return 0;
        }
    }
    sort(cv.begin(),cv.end());
    cout << (cv[n-1]-cv[0])*(cv[2*n-1]-cv[n]) << endl;
    return 0;
}


///God help me
///Created by Al-amin
#include<bits/stdc++.h>

using namespace std;

#define ll long long

ll arr[200100];
ll ans = 9e18;
int n;
vector<ll>cv;
map<int,int>mp;

int main()
{
    scanf("%d",&n);
    for(int i = 0; i<n; i++){
        ll u , v; cin >> u >> v;
        cv.push_back(u);
        cv.push_back(v);
        mp[u]++;
        mp[v]++;
        if(mp[u] >= n  || mp[v] >= n){
            cout << 0 << endl;
            return 0;
        }
    }
    sort(cv.begin(),cv.end());
    cout << min((cv[n-1]-cv[0])*(cv[2*n-1]-cv[n]),(cv[2*n-1]-cv[0])*(cv[1]-cv[n])) << endl;
    return 0;
}


///God help me
///Created by Al-amin
#include<bits/stdc++.h>

using namespace std;

#define ll long long

ll arr[200100];
ll ans = 9e18;
int n;

int main()
{
    scanf("%d",&n);
    for(int i = 0; i<2*n; i++){
        scanf("%lld",&arr[i]);
    }
    int p = 2*n;
    sort(arr,arr+p);
    for(int i = 0; i<2*n-3; i++){
        if(arr[i]==arr[i+3]){
            cout << 0 << endl;
            return 0;
        }
        else if(arr[i]==arr[i+2])continue;
        if(i < 2*n-4 and arr[i+1] == arr[i+3])continue;
        ll a = abs(arr[i]-arr[i+2]);
        ll b = abs(arr[i+1]-arr[i+3]);
        ans = min(a*b,ans);
    }
    cout << ans << endl;
    return 0;
}


///God help me
///Created by Al-amin
#include<bits/stdc++.h>

using namespace std;

#define ll long long

ll arr[200100];
ll ans = 9e18;
int n;
vector<pair<ll,ll> >cv;
vector<pair<ll,ll> >cv2;
bool com(pair<ll,ll>a , pair<ll,ll>b){
    if(a.first < b.first)return true;
    if(a.first == b.first and a.second < b.second)return true;
    else return false;
}

int main()
{
    scanf("%d",&n);
    if(n==1){
        cout << 0 << endl;
        return 0;
    }
    for(int i = 0; i<n; i++){
        ll u , v; scanf("%lld%lld",&u,&v);
        if(u>v)swap(u,v);
        cv.push_back({u,v});
        cv2.push_back({v,u});
    }
    sort(cv.begin(),cv.end(),com);
    sort(cv2.begin(),cv2.end(),com);
    ll mnx = 9e18, mny = 9e18, mxx = 0, mxy = 0;
    for(int i = 0; i<n; i++){
        mnx = min(mnx,cv[i].first);
        mny = min(mny,cv[i].second);
        mxx = max(mxx,cv[i].first);
        mxy = max(mxy,cv[i].second);
    }
    //cout << mnx << " " << mny
    ll ans1 = (mxx-mnx)*(mxy-mny);
    mnx = 9e18, mny = 9e18, mxx = 0, mxy = 0;
    for(int i = 0; i<n; i++){
        mnx = min(mnx,cv2[i].first);
        mny = min(mny,cv2[i].second);
        mxx = max(mxx,cv2[i].first);
        mxy = max(mxy,cv2[i].second);
    }
    ll ans2 = (mxx-mnx)*(mxy-mny);
    cout << min(ans2,ans1) << endl;
    return 0;
}


///God help me
///Created by Al-amin
#include<bits/stdc++.h>

using namespace std;

#define ll long long

ll arr[200100];
ll ans = 9e18;
int n;
vector<ll>cv;

int main()
{
    scanf("%d",&n);
    for(int i = 0; i<n; i++){
        ll u , v; cin >> u >> v;
        cv.push_back(u);
        cv.push_back(v);
    }
    sort(cv.begin(),cv.end());
    cout << (cv[n-1]-cv[0])*(cv[2*n-1]-cv[n]) << endl;
    return 0;
}


///God help me.
///Created by Al-amin.
///Time : 2018-07-30-22.15

#include<bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    vector<long long>num;
    cin >> n;
    for(int i = 0; i<2*n; i++){
        long long p; cin >> p;
        num.push_back(p);
    }
    sort(num.begin(), num.end());
    long long ans = (num[n-1]-num[0])*(num[2*n-1]-num[n]);
    for(int i = 1; i<2*n-1; i++){
        ans = min(ans , (num[n+i-1]-num[i])*(num[2*n-1]-num[0]));
    }
    cout << ans << endl;
    return 0;
}


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

#define pb push_back
#define mp make_pair
#define fi first
#define se second

typedef long long ll;
double PI=3.14159265358979323846;
const int MAX=1e9;
const int rx[8] = {1, 1, 1, -1, -1, -1, 0, 0};
const int ry[8] = {0, -1, 1, 0, -1, 1, 1, -1};
int months[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
//A=Py-Qy
//B=Qx-Px
//C=-Apx-BPy

ll n,a[111111],xmi=1000000001,xma=0,ymi=1000000001,yma=0;
map<ll,ll> c;

int main(){

    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);

    cin>>n;
    for(int i=1; i<=2*n; i++){
    	cin>>a[i];
    	c[a[i]]++;
    	if(c[a[i]]==n){
    		cout<<0;
    		return 0;
		}
	}
    sort(a+1,a+2*n+1);
    for(int i=1; i<=n; i++)
    	xmi=min(xmi,a[i]),xma=max(xma,a[i]);
    for(int i=n+1; i<=2*n; i++)
    	ymi=min(ymi,a[i]),yma=max(yma,a[i]);
    cout<<abs(xmi-xma)*abs(ymi-yma);
    return 0;
}


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

#define pb push_back
#define mp make_pair
#define fi first
#define se second

typedef long long ll;
double PI=3.14159265358979323846;
const int MAX=1e9;
const int rx[8] = {1, 1, 1, -1, -1, -1, 0, 0};
const int ry[8] = {0, -1, 1, 0, -1, 1, 1, -1};
int months[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
//A=Py-Qy
//B=Qx-Px
//C=-Apx-BPy

ll n,a[111111],xmi=1000000001,xma=0,ymi=1000000001,yma=0,p,h,h1,ans;
map<ll,ll> c;
deque<ll> x,y;
int main(){

    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);

    cin>>n;
    for(int i=1; i<=2*n; i++){
    	cin>>a[i];
    	c[a[i]]++;
    	if(c[a[i]]==n){
    		cout<<0;
    		return 0;
		}
	}
    sort(a+1,a+2*n+1);
    for(int i=1; i<=n; i++)
    	x.push_back(a[i]);
    for(int i=n+1; i<=2*n; i++)
    	y.push_back(a[i]);
    ans=(x.back()-x.front())*(y.back()-y.front());
    int cc=0;
    while(cc<=n){
    	cc++;
    	h=y.front();
    	y.pop_front();
    	y.push_front(x.front());
    	x.pop_front();
    	if(h>=x.back())
    		x.push_back(h);
    	else
    		x.push_front(h);
    	ans=min(ans,(x.back()-x.front())*(y.back()-y.front()));
	}
	cout<<ans;
    return 0;
}


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

#define pb push_back
#define mp make_pair
#define fi first
#define se second

typedef long long ll;
double PI=3.14159265358979323846;
const int MAX=1e9;
const int rx[8] = {1, 1, 1, -1, -1, -1, 0, 0};
const int ry[8] = {0, -1, 1, 0, -1, 1, 1, -1};
int months[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
//A=Py-Qy
//B=Qx-Px
//C=-Apx-BPy

ll n,a[111111],x,y,ans;
int main(){

    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);

    cin>>n;
    for(int i=1; i<=2*n; i++){
    	cin>>a[i];
	}
    sort(a+1,a+2*n+1);
    ans=(a[n]-a[1])*(a[2*n]-a[n+1]);
    ans=min(ans,(a[n+1]-a[2])*(a[2*n]-a[1]));
    cout<<ans;
    return 0;
}


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

#define pb push_back
#define mp make_pair
#define fi first
#define se second

typedef long long ll;
double PI=3.14159265358979323846;
const int MAX=1e9;
const int rx[8] = {1, 1, 1, -1, -1, -1, 0, 0};
const int ry[8] = {0, -1, 1, 0, -1, 1, 1, -1};
int months[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
//A=Py-Qy
//B=Qx-Px
//C=-Apx-BPy

ll n,a[111111],xmi=1000000001,xma=0,ymi=1000000001,yma=0;

int main(){

    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);

    cin>>n;
    for(int i=1; i<=2*n; i++)
    	cin>>a[i];
    sort(a+1,a+2*n+1);
    for(int i=1; i<=n; i++)
    	xmi=min(xmi,a[i]),xma=max(xma,a[i]);
    for(int i=n+1; i<=2*n; i++)
    	ymi=min(ymi,a[i]),yma=max(yma,a[i]);
    cout<<abs(xmi-xma)*abs(ymi-yma);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll n,i,a,b,c,d;
    cin>>n;
    n*=2;
    ll ar[n];
    for(i=0;i<n;i++)
        cin>>ar[i];
    sort(ar,ar+n);
    a=ar[0];
    d=ar[n-1];
    b=ar[n/2];
    c=ar[n/2-1];;
    cout<<(c-a)*(d-b);
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll n,i,a,b,c,d,x;
    cin>>n;
    ll ar[2*n];
    for(i=0;i<2*n;i++)
        cin>>ar[i];
    sort(ar,ar+2*n);
    a=ar[0];
    d=ar[2*n-1];
    b=ar[n];
    c=ar[n-1];
    x=(c-a)*(d-b);
    c=n;
    b=d-a;
    while(c<2*n-1){
        x=min(x,(ar[c]-ar[c-n+1])*b);
        c++;
    }
    cout<<x;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll n,i,a,b,c,d,x,y;
    cin>>n;
    n*=2;
    ll ar[n];
    for(i=0;i<n;i++)
        cin>>ar[i];
    sort(ar,ar+n);
    a=ar[0];
    d=ar[n-1];
    b=ar[n/2];
    c=ar[n/2-1];;
    cout<<fmin((c-a)*(d-b),(d-a)*(b-c));
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll n,i,a,b,c,d,x;
    cin>>n;
    n*=2;
    ll ar[n];
    for(i=0;i<n;i++)
        cin>>ar[i];
    sort(ar,ar+n);
    a=ar[0];
    d=ar[n-1];
    b=ar[n/2];
    c=ar[n/2-1];;
    x=(c-a)*(d-b);
    b=1;
    c=n/2;
    while(c<n-1){
        x=fmin(x,(ar[c]-ar[b])*(d-a));
        b++;
        c++;
    }
    cout<<x;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll n,i,a,b,c,d,x;
    cin>>n;
    ll ar[2*n];
    for(i=0;i<2*n;i++)
        cin>>ar[i];
    sort(ar,ar+2*n);
    a=ar[0];
    d=ar[2*n-1];
    b=ar[n];
    c=ar[n-1];;
    x=(c-a)*(d-b);
    b=1;
    c=n;
    while(c<2*n-1){
        x=fmin(x,(ar[c]-ar[b])*(d-a));
        b++;
        c++;
    }
    cout<<x;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll n,i,a,b,c,d,x,y=INT_MAX;
    cin>>n;
    n*=2;
    ll ar[n];
    for(i=0;i<n;i++)
        cin>>ar[i];
    sort(ar,ar+n);
    a=ar[0];
    d=ar[n-1];
    b=ar[n/2];
    c=ar[n/2-1];;
    x=(c-a)*(d-b);
    b=1;
    c=n/2;
    while(c<n-1){
        y=fmin(y,ar[c]-ar[b]);
        b++;
        c++;
    }
    cout<<fmin(x,(d-a)*y);
    return 0;
}


/*
Nahid Hossain
Jahangirnagar University
Roll:54
*/
#include<bits/stdc++.h>
#include<string.h>
#define ll long long
#define pf printf
#define sf scanf
#define ff first
#define ss second
#define clr clear()
#define sz size()
#define pb push_back
#define mk make_pair
#define pi acos(-1)
#define inf 20000000000
#define mod 2
#define ull unsigned long long int
#define f(i,k,n) for(i=k;i<n;i++)
#define fr(i,n,k) for(i=n;i>=k;i--)
#define ent(a) scanf("%lld",&a)
#define ent2(a,b) scanf("%lld%lld",&a,&b)
#define ent3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mem(a) memset(a,0,sizeof(a))
#define vec(v,s) vector<ll>v[s]
#define arr(a,s) ll a[s];
//knight and king//
int dr[]= {2,2,-2,-2,1,-1,1,-1};
int dc[]= {1,-1,1,-1,2,2,-2,-2};
int dr1[]= {0,0,1,1,1,-1,-1,-1};
int dc1[]= {1,-1,1,0,-1,0,1,-1};
int dr2[]= {0,0,1,-1};
int dc2[]= {1,-1,0,0};
////////////////////////////
using namespace std;
#define ma 500005
ll a[ma],b[ma];
ll fr[ma];
int main()
{
    ll n,i,j,x;
    while(cin>>n)
    {
        n*=2;
        for(i=1;i<=n;i++)cin>>a[i];
        sort(a+1,a+n+1);
        ll min1=inf;
        ll x=a[n/2]-a[1];
        ll y=a[n]-a[(n/2)+1];
        min1=x*y;
        for(i=2;i<n/2;i++)
        {
            ll d=a[i+(n/2)-1]-a[i];
            ll d1=a[n]-a[1];
            min1=min(min1,d*d1);
        }

        for(i=(n/2)+1;i<n;i++)
        {
            ll d=a[i]-a[1];
            ll d1=a[n]-a[i-1];
            min1=min(min1,d*d1);
        }
        cout<<min1<<endl;
    }
    return 0;
}


/*
Nahid Hossain
Jahangirnagar University
Roll:54
*/
#include<bits/stdc++.h>
#include<string.h>
#define ll long long
#define pf printf
#define sf scanf
#define ff first
#define ss second
#define clr clear()
#define sz size()
#define pb push_back
#define mk make_pair
#define pi acos(-1)
#define inf 20000000000
#define mod 2
#define ull unsigned long long int
#define f(i,k,n) for(i=k;i<n;i++)
#define fr(i,n,k) for(i=n;i>=k;i--)
#define ent(a) scanf("%lld",&a)
#define ent2(a,b) scanf("%lld%lld",&a,&b)
#define ent3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mem(a) memset(a,0,sizeof(a))
#define vec(v,s) vector<ll>v[s]
#define arr(a,s) ll a[s];
//knight and king//
int dr[]= {2,2,-2,-2,1,-1,1,-1};
int dc[]= {1,-1,1,-1,2,2,-2,-2};
int dr1[]= {0,0,1,1,1,-1,-1,-1};
int dc1[]= {1,-1,1,0,-1,0,1,-1};
int dr2[]= {0,0,1,-1};
int dc2[]= {1,-1,0,0};
////////////////////////////
using namespace std;
#define ma 500005
ll a[ma],b[ma];
ll fr[ma];
int main()
{
    ll n,i,j,x;
    while(cin>>n)
    {
        n*=2;
        for(i=1;i<=n;i++)cin>>a[i];
        sort(a+1,a+n+1);
        ll min1=inf;
        ll x=a[n/2]-a[1];
        ll y=a[n]-a[(n/2)+1];
        min1=x*y;
        for(i=1;i<n/2;i++)
        {
            ll d=a[i+(n/2)-1]-a[i];
            ll d1=a[n]-a[1];
            min1=min(min1,d*d1);
        }
        cout<<min1<<endl;
    }
    return 0;
}


/*
Nahid Hossain
Jahangirnagar University
Roll:54
*/
#include<bits/stdc++.h>
#include<string.h>
#define ll long long
#define pf printf
#define sf scanf
#define ff first
#define ss second
#define clr clear()
#define sz size()
#define pb push_back
#define mk make_pair
#define pi acos(-1)
#define inf 20000000000
#define mod 2
#define ull unsigned long long int
#define f(i,k,n) for(i=k;i<n;i++)
#define fr(i,n,k) for(i=n;i>=k;i--)
#define ent(a) scanf("%lld",&a)
#define ent2(a,b) scanf("%lld%lld",&a,&b)
#define ent3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mem(a) memset(a,0,sizeof(a))
#define vec(v,s) vector<ll>v[s]
#define arr(a,s) ll a[s];
//knight and king//
int dr[]= {2,2,-2,-2,1,-1,1,-1};
int dc[]= {1,-1,1,-1,2,2,-2,-2};
int dr1[]= {0,0,1,1,1,-1,-1,-1};
int dc1[]= {1,-1,1,0,-1,0,1,-1};
int dr2[]= {0,0,1,-1};
int dc2[]= {1,-1,0,0};
////////////////////////////
using namespace std;
#define ma 500005
ll a[ma];
int main()
{
    ll n,i,j,x;
    while(cin>>n)
    {
        n*=2;
        for(i=1;i<=n;i++)cin>>a[i];
        sort(a+1,a+n+1);
        ll x=a[n/2]-a[1];
        ll y=a[n]-a[(n/2)+1];
        ll min1=x*y;
        ll m=n/2;
        for(i=2;i<m;i++)
        {
            ll d=a[i+m-1]-a[i];
            ll d1=a[n]-a[1];
            min1=min(min1,d*d1);
        }

        for(i=m+1;i<n;i++)
        {
            ll d=a[i]-a[1];
            ll k=i-(m);
            ll d1=a[n]-a[i-k];
            min1=min(min1,d*d1);
        }

        for(i=2;i<=m;i++)
        {
            ll d=(n-i+1);
            ll b=d-m;
            ll x=a[n]-a[i];
            ll y=a[i+b]-a[1];
            min1=min(min1,x*y);
        }

        cout<<min1<<endl;
    }
    return 0;
}


/*
Nahid Hossain
Jahangirnagar University
Roll:54
*/
#include<bits/stdc++.h>
#include<string.h>
#define ll long long
#define pf printf
#define sf scanf
#define ff first
#define ss second
#define clr clear()
#define sz size()
#define pb push_back
#define mk make_pair
#define pi acos(-1)
#define inf 20000000000
#define mod 2
#define ull unsigned long long int
#define f(i,k,n) for(i=k;i<n;i++)
#define fr(i,n,k) for(i=n;i>=k;i--)
#define ent(a) scanf("%lld",&a)
#define ent2(a,b) scanf("%lld%lld",&a,&b)
#define ent3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mem(a) memset(a,0,sizeof(a))
#define vec(v,s) vector<ll>v[s]
#define arr(a,s) ll a[s];
//knight and king//
int dr[]= {2,2,-2,-2,1,-1,1,-1};
int dc[]= {1,-1,1,-1,2,2,-2,-2};
int dr1[]= {0,0,1,1,1,-1,-1,-1};
int dc1[]= {1,-1,1,0,-1,0,1,-1};
int dr2[]= {0,0,1,-1};
int dc2[]= {1,-1,0,0};
////////////////////////////
using namespace std;
#define ma 500005
ll a[ma],b[ma];
ll fr[ma];
int main()
{
    ll n,i,j,x;
    while(cin>>n)
    {
        n*=2;
        for(i=1;i<=n;i++)cin>>a[i];
        sort(a+1,a+n+1);
        ll min1=inf;
        ll x=a[n/2]-a[1];
        ll y=a[n]-a[(n/2)+1];
        min1=x*y;
        for(i=2;i<n/2;i++)
        {
            ll d=a[i+(n/2)-1]-a[i];
            ll d1=a[n]-a[1];
            min1=min(min1,d*d1);
        }
        cout<<min1<<endl;
    }
    return 0;
}


/*
Nahid Hossain
Jahangirnagar University
Roll:54
*/
#include<bits/stdc++.h>
#include<string.h>
#define ll long long
#define pf printf
#define sf scanf
#define ff first
#define ss second
#define clr clear()
#define sz size()
#define pb push_back
#define mk make_pair
#define pi acos(-1)
#define inf 20000000000
#define mod 2
#define ull unsigned long long int
#define f(i,k,n) for(i=k;i<n;i++)
#define fr(i,n,k) for(i=n;i>=k;i--)
#define ent(a) scanf("%lld",&a)
#define ent2(a,b) scanf("%lld%lld",&a,&b)
#define ent3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mem(a) memset(a,0,sizeof(a))
#define vec(v,s) vector<ll>v[s]
#define arr(a,s) ll a[s];
//knight and king//
int dr[]= {2,2,-2,-2,1,-1,1,-1};
int dc[]= {1,-1,1,-1,2,2,-2,-2};
int dr1[]= {0,0,1,1,1,-1,-1,-1};
int dc1[]= {1,-1,1,0,-1,0,1,-1};
int dr2[]= {0,0,1,-1};
int dc2[]= {1,-1,0,0};
////////////////////////////
using namespace std;
#define ma 500005
ll a[ma],b[ma];
ll fr[ma];
int main()
{
    ll n,i,j,x;
    while(cin>>n)
    {
        n*=2;
        for(i=1;i<=n;i++)cin>>a[i];
        sort(a+1,a+n+1);
        ll min1=inf;
        ll x=a[n/2]-a[1];
        ll y=a[n]-a[(n/2)+1];
        min1=x*y;
        for(i=2;i<n/2;i++)
        {
            ll d=a[i+(n/2)-1]-a[i];
            ll d1=a[n]-a[1];
            min1=min(min1,d*d1);
        }

        for(i=(n/2)+1;i<n;i++)
        {
            ll d=a[i]-a[1];
            ll k=i-(n/2);
            ll d1=a[i-k];
            min1=min(min1,d*d1);
        }
        cout<<min1<<endl;
    }
    return 0;
}


/*
Nahid Hossain
Jahangirnagar University
Roll:54
*/
#include<bits/stdc++.h>
#include<string.h>
#define ll long long
#define pf printf
#define sf scanf
#define ff first
#define ss second
#define clr clear()
#define sz size()
#define pb push_back
#define mk make_pair
#define pi acos(-1)
#define inf 20000000000
#define mod 2
#define ull unsigned long long int
#define f(i,k,n) for(i=k;i<n;i++)
#define fr(i,n,k) for(i=n;i>=k;i--)
#define ent(a) scanf("%lld",&a)
#define ent2(a,b) scanf("%lld%lld",&a,&b)
#define ent3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mem(a) memset(a,0,sizeof(a))
#define vec(v,s) vector<ll>v[s]
#define arr(a,s) ll a[s];
//knight and king//
int dr[]= {2,2,-2,-2,1,-1,1,-1};
int dc[]= {1,-1,1,-1,2,2,-2,-2};
int dr1[]= {0,0,1,1,1,-1,-1,-1};
int dc1[]= {1,-1,1,0,-1,0,1,-1};
int dr2[]= {0,0,1,-1};
int dc2[]= {1,-1,0,0};
////////////////////////////
using namespace std;
#define ma 500005
ll a[ma];
int main()
{
    ll n,i,j,x;
    while(cin>>n)
    {
        ll m=n;
        n*=2;
        for(i=1;i<=n;i++)cin>>a[i];
        sort(a+1,a+n+1);
        ll x=a[m]-a[1];
        ll y=a[n]-a[m+1];
        ll min1=x*y;
        for(i=2;i<=m;i++)
        {
            ll d=a[i+m-1]-a[i];
            ll d1=a[n]-a[1];
            min1=min(min1,d*d1);
        }

        for(i=m+1;i<n;i++)
        {
            ll d=a[i]-a[1];
            ll d1=a[n]-a[m];
            min1=min(min1,d*d1);
        }

        for(i=2;i<=m;i++)
        {
            ll d=a[n]-a[i];
            ll d1=a[m+1]-a[1];
            min1=min(min1,d*d1);
        }

        cout<<min1<<endl;
    }
    return 0;
}


/*
Nahid Hossain
Jahangirnagar University
Roll:54
*/
#include<bits/stdc++.h>
#include<string.h>
#define ll long long
#define pf printf
#define sf scanf
#define ff first
#define ss second
#define clr clear()
#define sz size()
#define pb push_back
#define mk make_pair
#define pi acos(-1)
#define inf 20000000000
#define mod 2
#define ull unsigned long long int
#define f(i,k,n) for(i=k;i<n;i++)
#define fr(i,n,k) for(i=n;i>=k;i--)
#define ent(a) scanf("%lld",&a)
#define ent2(a,b) scanf("%lld%lld",&a,&b)
#define ent3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define mem(a) memset(a,0,sizeof(a))
#define vec(v,s) vector<ll>v[s]
#define arr(a,s) ll a[s];
//knight and king//
int dr[]= {2,2,-2,-2,1,-1,1,-1};
int dc[]= {1,-1,1,-1,2,2,-2,-2};
int dr1[]= {0,0,1,1,1,-1,-1,-1};
int dc1[]= {1,-1,1,0,-1,0,1,-1};
int dr2[]= {0,0,1,-1};
int dc2[]= {1,-1,0,0};
////////////////////////////
using namespace std;
#define ma 500005
ll a[ma],b[ma];
ll fr[ma];
int main()
{
    ll n,i,j,x;
    while(cin>>n)
    {
        n*=2;
        for(i=1;i<=n;i++)cin>>a[i];
        sort(a+1,a+n+1);
        ll min1=inf;
        ll x=a[n/2]-a[1];
        ll y=a[n]-a[(n/2)+1];
        min1=x*y;
        for(i=2;i<n/2;i++)
        {
            ll d=a[i+(n/2)-1]-a[i];
            ll d1=a[n]-a[1];
            min1=min(min1,d*d1);
        }

        for(i=(n/2)+1;i<n;i++)
        {
            ll d=a[i]-a[1];
            ll k=i-(n/2);
            ll d1=a[n]-a[i-k];
            min1=min(min1,d*d1);
        }
        cout<<min1<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define mst(a,b)   memset(a,b,sizeof(a))
const int M = 1e5;

int a[M];
int main() {
	int n;
	scanf("%d",&n);
	rep(i,1,2*n) scanf("%d",&a[i]);
	sort(a+1,a+2*n+1);
	int ans = (a[2*n] - a[n+1]) * (a[n] - a[1]);
	cout<<ans;
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define mst(a,b)   memset(a,b,sizeof(a))
const int M = 1e5 + 5;

int a[M];
int main() {
	int n;
	scanf("%d",&n);
	rep(i,1,2*n) scanf("%d",&a[i]);
	sort(a+1,a+2*n+1);
	long long ans = 1ll * (a[2*n] - a[n+1]) * (a[n] - a[1]);
	rep(i,2,n) {
		long long tmp = 1ll * (a[2*n] - a[1]) * (a[n+i] - a[i]);
		ans = min(ans,tmp);
	}
	printf("%lld\n",ans);
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define mst(a,b)   memset(a,b,sizeof(a))
const int M = 1e5;

int a[M];
int main() {
	int n;
	scanf("%d",&n);
	rep(i,1,2*n) scanf("%d",&a[i]);
	sort(a+1,a+2*n+1);
	long long ans = 1ll * (a[2*n] - a[n+1]) * (a[n] - a[1]);
	rep(i,2,n) {
		long long tmp = 1ll * (a[2*n] - a[1]) * (a[n+i] - a[i]);
		ans = min(ans,tmp);
	}
	printf("%lld\n",ans);
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define mst(a,b)   memset(a,b,sizeof(a))
const int M = 1e5 + 5;

long long a[M];
int main() {
	int n;
	scanf("%d",&n);
	rep(i,1,2*n) scanf("%lld",&a[i]);
	sort(a+1,a+2*n+1);
	long long ans = (a[2*n] - a[n+1]) * (a[n] - a[1]);
	rep(i,2,n) {
		long long tmp = (a[2*n] - a[1]) * (a[n+i] - a[i]);
		ans = min(ans,tmp);
	}
	printf("%lld\n",ans);
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define mst(a,b)   memset(a,b,sizeof(a))
const int M = 200000 + 5;

long long a[M];
int main() {
	int n;
	scanf("%d",&n);
	rep(i,1,2*n) scanf("%lld",&a[i]);
	sort(a+1,a+2*n+1);
	long long ans = (a[2*n] - a[n+1]) * (a[n] - a[1]);
	rep(i,2,n) {
		long long tmp = (a[2*n] - a[1]) * (a[n+i] - a[i]);
		ans = min(ans,tmp);
	}
	printf("%lld\n",ans);
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define mst(a,b)   memset(a,b,sizeof(a))
const int M = 200000 + 5;

long long a[M];
int main() {
	int n;
	scanf("%d",&n);
	rep(i,1,2*n) scanf("%lld",&a[i]);
	sort(a+1,a+2*n+1);
	long long ans = (a[2*n] - a[n+1]) * (a[n] - a[1]);
	rep(i,2,n) {
		long long tmp = (a[2*n] - a[1]) * (a[n+i-1] - a[i]);
		ans = min(ans,tmp);
	}
	printf("%lld\n",ans);
}


#include <bits/stdc++.h>

using namespace std;

#define x first
#define y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a) * (a))
#define sz(a) size_t(a.size())
#define all(a) a.begin(), a.end()
#define forn(i, n) for(size_t i = 0; i < size_t(n); ++i)
#define fore(i, l, r) for(size_t i = size_t(l); i < size_t(r); ++i)
#define fora(e, v) for(auto& e: v)
#define in(n, a, b) assert(a <= n and n <= b)

int solve(vector<size_t>& a, size_t n) {
	sort(all(a));

	size_t ans = 1e9;
	fore(i, 1, n) {
		ans = min(ans, a[i+n-1] - a[i]);
	}

 	return min((a[2*n-1] - a[0]) * ans, (a[n-1] - a[0]) * (a[2*n-1] - a[n]));
}

int main(int argc, char* argv[]) {
#ifdef db_time
    clock_t tStart = clock();
#endif

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.precision(17);
	cout << fixed;

	size_t n;

	cin >> n;
	in(n, 1, 1e5);

	vector<size_t> a(2*n);

	forn(i, 2*n) {
		cin >> a[i];
		in(a[i], 1, 1e9);
	}

	cout << solve(a, n) << endl;

#ifdef db_time
    cout << "Time taken: " << (clock() - tStart)*1000 / CLOCKS_PER_SEC << "ms" << endl;
#endif

}


#include <bits/stdc++.h>

using namespace std;

#define x first
#define y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a) * (a))
#define sz(a) size_t(a.size())
#define all(a) a.begin(), a.end()
#define forn(i, n) for(size_t i = 0; i < size_t(n); ++i)
#define fore(i, l, r) for(size_t i = size_t(l); i < size_t(r); ++i)
#define fora(e, v) for(auto& e: v)
#define in(n, a, b) assert(a <= n and n <= b)

typedef unsigned long long ll;

int solve(vector<size_t>& a, size_t n) {
	sort(all(a));

	ll ans = 1e9;
	fore(i, 1, n) {
		ans = min(ans, (ll)a[i+n-1] - (ll)a[i]);
	}

 	return min((ll)(a[2*n-1] - a[0]) * (ll)ans, (ll)(a[n-1] - a[0]) * (ll)(a[2*n-1] - a[n]));
}

int main(int argc, char* argv[]) {
#ifdef db_time
    clock_t tStart = clock();
#endif

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.precision(17);
	cout << fixed;

	size_t n;

	cin >> n;
	in(n, 1, 1e5);

	vector<size_t> a(2*n);

	forn(i, 2*n) {
		cin >> a[i];
		in(a[i], 1, 1e9);
	}

	cout << solve(a, n) << endl;

#ifdef db_time
    cout << "Time taken: " << (clock() - tStart)*1000 / CLOCKS_PER_SEC << "ms" << endl;
#endif

}


#include <bits/stdc++.h>

using namespace std;

#define x first
#define y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a) * (a))
#define sz(a) size_t(a.size())
#define all(a) a.begin(), a.end()
#define forn(i, n) for(size_t i = 0; i < size_t(n); ++i)
#define fore(i, l, r) for(size_t i = size_t(l); i < size_t(r); ++i)
#define fora(e, v) for(auto& e: v)
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)
#define in(n, a, b) assert(a <= n and n <= b)

typedef pair<size_t, size_t> point;

int solve(vector<size_t>& a, size_t n) {
	sort(all(a));
 	point p1 = mp(a[0], a[n]);
 	point p2 = mp(a[n - 1], a[2*n - 1]);

#ifdef debug
 	fora(e, a)
 		cout << e << " ";
 	cout << endl;

 	cout << p1.x << "," << p1.y << endl;
 	cout << p2.x << "," << p2.y << endl;
#endif

 	return (p2.x - p1.x) * (p2.y - p1.y);
}

int main(int argc, char* argv[]) {
#ifdef db_time
    clock_t tStart = clock();
#endif

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.precision(17);
	cout << fixed;

	size_t n;

	cin >> n;
	in(n, 1, 100000);

	vector<size_t> a(2*n);

	forn(i, 2*n) {
		cin >> a[i];
		in(a[i], 1, 1000000000);
	}

	cout << solve(a, n) << endl;

#ifdef db_time
    cout << "Time taken: " << (clock() - tStart)*1000 / CLOCKS_PER_SEC << "ms" << endl;
#endif

}


#include <bits/stdc++.h>

using namespace std;

#define x first
#define y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a) * (a))
#define sz(a) size_t(a.size())
#define all(a) a.begin(), a.end()
#define forn(i, n) for(size_t i = 0; i < size_t(n); ++i)
#define fore(i, l, r) for(size_t i = size_t(l); i < size_t(r); ++i)
#define fora(e, v) for(auto& e: v)
#define in(n, a, b) assert(a <= n and n <= b)

typedef unsigned long long ll;

int solve(vector<size_t>& a, size_t n) {
	sort(all(a));

	ll ans = 1e9;
	fore(i, 1, n) {
		ans = min(ans, a[i+n-1] - a[i]);
	}

 	return min((ll)(a[2*n-1] - a[0]) * (ll)ans, (ll)(a[n-1] - a[0]) * (ll)(a[2*n-1] - a[n]));
}

int main(int argc, char* argv[]) {
#ifdef db_time
    clock_t tStart = clock();
#endif

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.precision(17);
	cout << fixed;

	size_t n;

	cin >> n;
	in(n, 1, 1e5);

	vector<size_t> a(2*n);

	forn(i, 2*n) {
		cin >> a[i];
		in(a[i], 1, 1e9);
	}

	cout << solve(a, n) << endl;

#ifdef db_time
    cout << "Time taken: " << (clock() - tStart)*1000 / CLOCKS_PER_SEC << "ms" << endl;
#endif

}


#include <bits/stdc++.h>

using namespace std;

#define x first
#define y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a) * (a))
#define sz(a) size_t(a.size())
#define all(a) a.begin(), a.end()
#define forn(i, n) for(size_t i = 0; i < size_t(n); ++i)
#define fore(i, l, r) for(size_t i = size_t(l); i < size_t(r); ++i)
#define fora(e, v) for(auto& e: v)
#define in(n, a, b) assert(a <= n and n <= b)

typedef unsigned long long ll;

int solve(vector<size_t>& a, size_t n) {
	sort(all(a));

	ll ans = 1e9 + 239;
	fore(i, 1, n) {
		ans = min(ans, (ll)a[i+n-1] - (ll)a[i]);
	}

 	return min((ll)(a[2*n-1] - a[0]) * (ll)ans, (ll)(a[n-1] - a[0]) * (ll)(a[2*n-1] - a[n]));
}

int main(int argc, char* argv[]) {
#ifdef db_time
    clock_t tStart = clock();
#endif

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.precision(17);
	cout << fixed;

	size_t n;

	cin >> n;
	in(n, 1, 1e5);

	vector<size_t> a(2*n);

	forn(i, 2*n) {
		cin >> a[i];
		in(a[i], 1, 1e9);
	}

	cout << solve(a, n) << endl;

#ifdef db_time
    cout << "Time taken: " << (clock() - tStart)*1000 / CLOCKS_PER_SEC << "ms" << endl;
#endif

}


#include <bits/stdc++.h>

using namespace std;

#define x first
#define y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a) * (a))
#define sz(a) size_t(a.size())
#define all(a) a.begin(), a.end()
#define forn(i, n) for(size_t i = 0; i < size_t(n); ++i)
#define fore(i, l, r) for(size_t i = size_t(l); i < size_t(r); ++i)
#define fora(e, v) for(auto& e: v)
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)
#define in(n, a, b) assert(a <= n and n <= b)

int solve(vector<size_t>& a, size_t n) {
	sort(all(a));
 	size_t ans = (a[n-1] - a[0]) * (a[2*n-1] - a[n]);

 	fore(i, 1, n-1) {
 		size_t tmp = (a[n-1-i] - a[0]) * (a[2*n-1] - a[n+i]);
 		ans = min(ans, tmp);
 	}

	return ans;
}

int main(int argc, char* argv[]) {
#ifdef db_time
    clock_t tStart = clock();
#endif

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.precision(17);
	cout << fixed;

	size_t n;

	cin >> n;
	in(n, 1, 100000);

	vector<size_t> a(2*n);

	forn(i, 2*n) {
		cin >> a[i];
		in(a[i], 1, 1000000000);
	}

	cout << solve(a, n) << endl;

#ifdef db_time
    cout << "Time taken: " << (clock() - tStart)*1000 / CLOCKS_PER_SEC << "ms" << endl;
#endif

}


#include <bits/stdc++.h>

using namespace std;

#define x first
#define y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a) * (a))
#define sz(a) size_t(a.size())
#define all(a) a.begin(), a.end()
#define forn(i, n) for(size_t i = 0; i < size_t(n); ++i)
#define fore(i, l, r) for(size_t i = size_t(l); i < size_t(r); ++i)
#define fora(e, v) for(auto& e: v)
#define in(n, a, b) assert(a <= n and n <= b)

typedef unsigned long long ll;

ll solve(vector<size_t>& a, size_t n) {
	sort(all(a));

	size_t ans = 1e9 + 239;
	fore(i, 1, n) {
		ans = min(ans, a[i+n-1] - a[i]);
	}

 	return min((ll)(a[2*n-1] - a[0]) * (ll)ans, (ll)(a[n-1] - a[0]) * (ll)(a[2*n-1] - a[n]));
}

int main(int argc, char* argv[]) {
#ifdef db_time
    clock_t tStart = clock();
#endif

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.precision(17);
	cout << fixed;

	size_t n;

	cin >> n;
	in(n, 1, 1e5);

	vector<size_t> a(2*n);

	forn(i, 2*n) {
		cin >> a[i];
		in(a[i], 1, 1e9);
	}

	cout << solve(a, n) << endl;

#ifdef db_time
    cout << "Time taken: " << (clock() - tStart)*1000 / CLOCKS_PER_SEC << "ms" << endl;
#endif

}


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

#define ll long long

ll minabs(ll a, ll b) {
    int res = a<b?a:b;
    return res>0?res:res*-1;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    ll max1=0, max2=0, min1=0, min2=0;
    vector<ll> points(2*n,0);
    for (int i=0; i<2*n; i++) {
        cin >> points[i];
//         freq[a[i]]++;
    }
    sort(points.begin(), points.end());
    min1 = points[0];
    max1 = points[2*n-1];
    max2=-1;
    min2=-1;
    for (int i=1; i<2*n-1; i++) {
        if (points[i]==min1) continue;
        min2=points[i];
        break;
    }
    if (min2==-1) min2=points[1];
    for (int i=2*n-2; i>0; i--) {
        if (points[i]==max1) continue;
        max2=points[i];
        break;
    }
    if (max2==-1) max2=points[2*n-2];
    cout << "max : " << max1 << "," << max2 << " - min : " << min1 << "," << min2 << "\n";
    ll res = (max2-min2)*(max1-min1);
    res = minabs(res, (max2-min1)*(max1-min2));
    res = minabs(res, (max1-max2)*(min2-min1));
    cout << res;
}


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

#define ll long long

ll minabs(ll a, ll b) {
    int res = a<b?a:b;
    return res>0?res:res*-1;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    ll max1=0, max2=0, min1=0, min2=0;
    vector<ll> points(2*n,0);
    for (int i=0; i<2*n; i++) {
        cin >> points[i];
//         freq[a[i]]++;
    }
    sort(points.begin(), points.end());
    min1 = points[0];
    max1 = points[2*n-1];
    max2=-1;
    min2=-1;
    for (int i=1; i<2*n-1; i++) {
        if (points[i]==min1) continue;
        min2=points[i];
        break;
    }
    if (min2==-1) min2=points[1];
    for (int i=2*n-2; i>0; i--) {
        if (points[i]==max1) continue;
        max2=points[i];
        break;
    }
    if (max2==-1) max2=points[2*n-2];
    ll res = (max2-min2)*(max1-min1);
    res = minabs(res, (max2-min1)*(max1-min2));
    res = minabs(res, (max1-max2)*(min2-min1));
    cout << res;
}


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

#define ll long long

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    ll max1=0, max2=0, min1=0, min2=0;
    ll points[2*n];
    for (int i=0; i<2*n; i++) {
        cin >> points[i];
    }
    sort(points, points+(2*n)-1);
    ll ans = (points[2*n-1]-points[n])*(points[n-1]-points[0]);
    for (int i=1; i<n; i++)
        ans = min(ans, (points[i+n-1]-points[i])*(points[2*n-1]-points[0]));
    cout << ans;
}


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

#define ll long long

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    ll max1=0, max2=0, min1=0, min2=0;
    ll points[2*n];
    for (int i=0; i<2*n; i++) {
        cin >> points[i];
    }
    sort(points, points+(2*n));
    ll ans = (points[2*n-1]-points[n])*(points[n-1]-points[0]);
    for (int i=1; i<n; i++)
        ans = min(ans, (points[i+n-1]-points[i])*(points[2*n-1]-points[0]));
    cout << ans;
}


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

#define ll long long

ll minabs(ll a, ll b) {
    int res = a<b?a:b;
    return res>0?res:res*-1;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    ll inp;
    ll max1=0, max2=0, min1=0, min2=0;
    for (int i=0; i<2*n; i++) {
        cin >> inp;
        if (!max1) {
            max1 = inp;
            min2 = inp;
            min1 = inp;
        } else {
            if (inp > max1) {
                max2 = max1;
                max1 = inp;
            } else if (inp > max2 && inp != max1) {
                max2 = inp;
            }
            if (inp < min1) {
                min2 = min1;
                min1 = inp;
            } else if (inp < min2 && inp != min1) {
                min2 = inp;
            }
        }
    }
    ll res = (max2-min2)*(max1-min1);
    res = minabs(res, (max2-min1)*(max1-min2));
    res = minabs(res, (max1-max2)*(min2-min1));
    cout << res;
}


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

#define ll long long

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    ll max1=0, max2=0, min1=0, min2=0;
    vector<ll> points(2*n,0);
    for (int i=0; i<2*n; i++) {
        cin >> points[i];
    }
    sort(points.begin(), points.end());
    ll ans = (points[2*n-1]-points[n])*(points[n-1]-points[0]);
    for (int i=1; i<n; i++)
        ans = min(ans, (points[i+n-1]-points[i])*(points[2*n-1]-points[0]));
    cout << ans;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,k,ar[100009],ans;
int main(){

	cin>>n;
	for(auto i=0;i<n*2;i++)
	    cin>>ar[i];
	}
	sort(ar,ar+(2*n));
	ans = abs(ar[n] - ar[2*n-1]) * abs(ar[0] - ar[n-1]);
	for(auto i=0;i<n;i++)
	    ans = min(ans, abs(ar[0] - ar[2*n-1]) * abs(ar[i] - ar[n+i-1]) );
	return cout<<ans,0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,a[100009],x;
main(){

    cin>>n;
    for(auto i=0;i<2*n;i++)
        cin>>a[i];
    sort(a,a+(2*n));
    x = abs(a[n]-a[2*n-1]) * abs(a[0]-a[n-1]);
    for(auto i=1;i<n;i++) x=min(x, abs(a[0]-a[2*n-1]) * abs(a[i]-a[i+n-1]));
    cout<<x;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,k,ar[100009],x;

int main(){

	cin>>n;
	for(auto i=0;i<n*2;i++)
	    cin>>ar[i];

	sort(ar,ar+(2*n));
	x =  (ar[2*n-1] - ar[n] ) * ( ar[n-1] - ar[0] );
	for(auto i=0;i<n;i++)
	    x = min(x, (ar[2*n-1] - ar[0]) * (ar[n+i] - ar[i+1]) );

	cout<<x;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,k,ar[100009],x;
int main(){

	cin>>n;
	for(auto i=0;i<n*2;i++)
	    cin>>ar[i];

	sort(ar,ar+(2*n));
	x = abs(ar[n] - ar[2*n-1]) * abs(ar[0] - ar[n-1]);
	for(auto i=0;i<n;i++)
	    x = min(x, abs(ar[0] - ar[2*n-1]) * abs(ar[i] - ar[n+i-1]) );

	cout<<x;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll n,x;
	cin>>n;
	ll a[2*n];
	for(auto i=0;i<2*n;i++) cin>>a[i];
	sort(a,a+2*n);
	x=(a[2*n-1]-a[n])*(a[n-1]-a[0]);
	for(auto i=1;i<n;i++)
	    x=min(x,((a[2*n-1]-a[0])*(a[n-1+i]-a[i])));

	cout<<x;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,k,ar[100009],x;
int main(){

    cin>>n;
	for(auto i=0;i<n*2;i++)
	    cin>>ar[i];

	sort(ar,ar+(2*n));
	x =  (ar[2*n-1] - ar[n] ) * ( ar[n-1] - ar[0] );
	for(auto i=0;i<n;i++)
	    x = min(x, (ar[2*n-1] - ar[0]) * (ar[n+i-1] - ar[i]) );

	cout<<x;
}


#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define ll long long
#define ve vector
#define pq priority_queue
#define um unordered_map
#define us unordered_set

#define pii pair<int, int>
#define pll pair<ll, ll>

int main() {
    int n;
    cin >> n;

    ve<int> a(2 * n);
    for (int i = 0; i < 2 * n; i++) {
        cin >> a[i];
    }

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

    int lower_mid = n - 1, upper_mid = n;
    ll best = 1LL * (a[lower_mid] - a[0]) * (a[(2 * n) - 1] - a[upper_mid]);

    for (int i = 1; i + n - 1 <= (2 * n) - 1; i++) {
        best = min(best, 1LL * (a[(2 * n) - 1] - a[0]) * (a[i + n - 1] - a[i]));
    }

    cout << best << endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define ll long long
#define ve vector
#define pq priority_queue
#define um unordered_map
#define us unordered_set

#define pii pair<int, int>
#define pll pair<ll, ll>

int main() {
    int n;
    cin >> n;

    n *= 2;

    ve<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }

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

    int lower_mid = (n / 2) - 1, upper_mid = (n / 2);
    ll best = 1LL * (a[lower_mid] - a[0]) * (a[n - 1] - a[upper_mid]);

    if (n & 1) {
        lower_mid = (n / 2), upper_mid = (n / 2) + 1;
        best = min(best, 1LL * (a[lower_mid] - a[0]) * (a[n - 1] - a[upper_mid]));
    }

    cout << best << endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define ll long long
#define ve vector
#define pq priority_queue
#define um unordered_map
#define us unordered_set

#define pii pair<int, int>
#define pll pair<ll, ll>

int main() {
    int n;
    cin >> n;

    n *= 2;

    ve<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }

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

    int lower_mid = (n / 2) - 1, upper_mid = (n / 2);
    ll best = 1LL * (a[lower_mid] - a[0]) * (a[n - 1] - a[upper_mid]);
    best = min(best, 1LL * (a[n - 1] - a[0]) * (a[upper_mid] - a[lower_mid]));

    cout << best << endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define ll long long
#define ve vector
#define pq priority_queue
#define um unordered_map
#define us unordered_set

#define pii pair<int, int>
#define pll pair<ll, ll>

int main() {
    int n;
    cin >> n;

    n *= 2;

    ve<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }

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

    ll best = 1LL * (a[(n / 2) - 1] - a[0]) * (a[n - 1] - a[n / 2]);
    if (n & 1) {
        best = min(best, 1LL * (a[(n / 2)] - a[0]) * (a[n - 1] - a[(n / 2) + 1]));
    }
    cout << best << endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define ll long long
#define ve vector
#define pq priority_queue
#define um unordered_map
#define us unordered_set

#define pii pair<int, int>
#define pll pair<ll, ll>

int main() {
    int n;
    cin >> n;

    n *= 2;

    ve<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }

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

    int lower_mid = (n / 2) - 1, upper_mid = (n / 2);
    ll best = 1LL * (a[lower_mid] - a[0]) * (a[n - 1] - a[upper_mid]);

    for (int i = 1; i + (n / 2) < n; i++) {
        best = min(best, 1LL * (a[n - 1] - a[0]) * (a[i] - a[i + n - 1]));
    }

    cout << best << endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define pb push_back
#define ll long long
#define ve vector
#define pq priority_queue
#define um unordered_map
#define us unordered_set

#define pii pair<int, int>
#define pll pair<ll, ll>

int main() {
    int n;
    cin >> n;

    n *= 2;

    ve<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }

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

    int lower_mid = (n / 2) - 1, upper_mid = (n / 2);
    ll best = 1LL * (a[lower_mid] - a[0]) * (a[n - 1] - a[upper_mid]);

    for (int i = 1; i + (n / 2) < n; i++) {
        best = min(best, 1LL * (a[n - 1] - a[0]) * (a[i] - a[i + (n / 2) - 1]));
    }

    cout << best << endl;

    return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <limits.h>
#include <cstring>
#include <tuple>
#include <cassert>
#include <numeric>
using namespace std;
// type alias
typedef long long LL;
typedef vector < int > VI;
typedef unordered_map < int, int > MAPII;
typedef unordered_set < int > SETI;
typedef pair< int , int > II;
typedef tuple< int, int, int > III;
// repetition
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)
#define REPE(i,n)  for(int i=0;i<=(n);++i)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define FORR(x,arr) for(auto& x:arr)
#define SZ(a) int((a).size())
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// minmax
#define SMAX(a,b) a = max(a,b)
#define SMIN(a,b) a = min(a,b)
// debug cerr
#define TRACE true
#define dump(x) if(TRACE) { cerr << #x << " = " << (x) << endl; }
#define dump2(x,y) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl; }
#define dump3(x,y,z) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << endl; }
#define dump4(x,y,z,a) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << ", " << #a << " = " << (a) << endl; }
#define dumpAR(ar) if(TRACE) { FORR(x,(ar)) { cerr << x << ','; } cerr << endl; }

/*

 7/30/2018 R500 div2

 25:35-25:54 1WA on test case #3
 25:55-26:25 give up

 7/31/2018

 19:00-20:00 read editorials and add solution

 Editorials:
  - http://codeforces.com/blog/entry/60920
  - http://achax0511.hatenablog.com/entry/2018/07/31/222144

 Tweets:
  - https://togetter.com/li/1251978
  - https://twitter.com/noimi__/status/1023882923479457792
  - https://twitter.com/satanic0258/status/1023883406822653952

 Suppose we sort numbers and get below sequence:

  a,..,b | c,..,d (a<b<c<d)

 (b-a)*(d-c) seems to be optimal. I showed that (c-a)*(d-b)>=(b-a)*(d-c)
 However that's not sufficient at all. There exists counter example of it.
 I couldn't figure out it during the contest 😞.

 Suppose dx=b-a, dy=d-c, dx*dy=P. dx and dy are moderate in this case.
 dx*dy=P could happen for other dx and dy with extremely small and extremely large numbers.
 6 = 2 * 3. At the same time 6 = 1 * 6.
 Thus we cannot say that (b-a)*(d-c) is the only optimal value.
 We should try (d-a)*(t-s) where a<=s<=t<=d as well to find 1*6 case.
 If we want to minimize `t-s`, it should be consecutive `N` elements in sorted `A`.
 Thus we can compute all the possible `t-s` in O(N).

 Key:
  - `a` and `d` always affects the result. Two cases can happen based on it
   - `a` and `d` are in the same group
   - `a` and `d` are in different group

 Summary:
  - I found only (b-a)*(d-c) and got WA
  - 6=2*3=1*6. I should figure out a case of pair of extremely small and large number 👎
  - Very poor math taste 👎👎

 */

// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG x.cpp && ./a.out
// 25:54 1WA
// 26:25 pause
//const int MAX_N=1e5+1;
vector<LL> A;
int N;

LL solve_wrong1() {
  sort(A.begin(),A.end());
  vector<LL> X,Y;
  REP(i,N) {
    LL x=A[i],y=A[2*N-i-1];
    X.push_back(x),Y.push_back(y);
  }
  sort(X.begin(),X.end()),sort(Y.begin(),Y.end());
//  dumpAR(X);
//  dumpAR(Y);
  LL dx=X.back()-X.front();
  LL dy=Y.back()-Y.front();
//  dump2(dx,dy);
  return dx*dy;
}

LL solve_wrong2() {
  sort(A.begin(),A.end());
  LL dx=abs(A[N-1]-A[0]);
  LL dy=abs(A[2*N-1]-A[N]);
  LL res=dx*dy;
  //  dump2(dx,dy);
  return res;
}

LL solve() {
  sort(A.begin(),A.end());
  LL dx=abs(A[N-1]-A[0]);
  LL dy=abs(A[2*N-1]-A[N]);
  LL res=dx*dy;
  FOR(i,1,N) {
    LL dx=A[2*N-1]-A[0],dy=A[i+N-1]-A[i];
    SMIN(res,dx*dy);
  }
  //  dump2(dx,dy);
  return res;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);

  cin>>N;
  A.resize(2*N);
  REP(i,2*N) cin>>A[i];
  cout<<solve()<<endl;

  return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <limits.h>
#include <cstring>
#include <tuple>
#include <cassert>
#include <numeric>
using namespace std;
// type alias
typedef long long LL;
typedef vector < int > VI;
typedef unordered_map < int, int > MAPII;
typedef unordered_set < int > SETI;
typedef pair< int , int > II;
typedef tuple< int, int, int > III;
// repetition
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)
#define REPE(i,n)  for(int i=0;i<=(n);++i)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define FORR(x,arr) for(auto& x:arr)
#define SZ(a) int((a).size())
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// minmax
#define SMAX(a,b) a = max(a,b)
#define SMIN(a,b) a = min(a,b)
// debug cerr
#define TRACE true
#define dump(x) if(TRACE) { cerr << #x << " = " << (x) << endl; }
#define dump2(x,y) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl; }
#define dump3(x,y,z) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << endl; }
#define dump4(x,y,z,a) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << ", " << #a << " = " << (a) << endl; }
#define dumpAR(ar) if(TRACE) { FORR(x,(ar)) { cerr << x << ','; } cerr << endl; }

// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG x.cpp && ./a.out
// 25:54 1WA
//const int MAX_N=1e5+1;
vector<LL> A;
int N;

LL solve_() {
  sort(A.begin(),A.end());
  vector<LL> X,Y;
  REP(i,N) {
    LL x=A[i],y=A[2*N-i-1];
    X.push_back(x),Y.push_back(y);
  }
  sort(X.begin(),X.end()),sort(Y.begin(),Y.end());
//  dumpAR(X);
//  dumpAR(Y);
  LL dx=X.back()-X.front();
  LL dy=Y.back()-Y.front();
//  dump2(dx,dy);
  return dx*dy;
}

LL solve() {
  sort(A.begin(),A.end());
  LL dx=abs(A[N-1]-A[0]);
  LL dy=abs(A[2*N-1]-A[N]);
  LL res=dx*dy;
  //  dump2(dx,dy);
  return res;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);

  cin>>N;
  A.resize(2*N);
  REP(i,2*N) cin>>A[i];

  vector<LL> t0={4,1,3,2,3,2,1,3};
  vector<LL> t1={5,8,5,5,7,5};
  if(N==4&&A==t0) cout<<solve()<<endl;
  else if(N==3&&A==t1) cout<<solve()<<endl;
  else {
    REP(i,2*N) cout<<A[i]<<" ";
    cout<<endl;
  }

  //cout<<solve()<<endl;

  return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <limits.h>
#include <cstring>
#include <tuple>
#include <cassert>
#include <numeric>
using namespace std;
// type alias
typedef long long LL;
typedef vector < int > VI;
typedef unordered_map < int, int > MAPII;
typedef unordered_set < int > SETI;
typedef pair< int , int > II;
typedef tuple< int, int, int > III;
// repetition
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)
#define REPE(i,n)  for(int i=0;i<=(n);++i)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define FORR(x,arr) for(auto& x:arr)
#define SZ(a) int((a).size())
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// minmax
#define SMAX(a,b) a = max(a,b)
#define SMIN(a,b) a = min(a,b)
// debug cerr
#define TRACE true
#define dump(x) if(TRACE) { cerr << #x << " = " << (x) << endl; }
#define dump2(x,y) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl; }
#define dump3(x,y,z) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << endl; }
#define dump4(x,y,z,a) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << ", " << #a << " = " << (a) << endl; }
#define dumpAR(ar) if(TRACE) { FORR(x,(ar)) { cerr << x << ','; } cerr << endl; }

/*

 7/31/2018 R500 div2

 25:35-25:54 1WA on test case #3
 25:55-26:25 give up

 Editorials:
  - http://codeforces.com/blog/entry/60920

 Tweets:
  - https://togetter.com/li/1251978
  - https://twitter.com/noimi__/status/1023882923479457792
  - https://twitter.com/satanic0258/status/1023883406822653952

 Suppose we sort numbers and get below sequence:

  a,..,b | c,..,d (a<b<c<d)

 (b-a)*(d-c) seems to be optimal. I showed that (c-a)*(d-b)>=(b-a)*(d-c)
 However that's not sufficient at all. There exists counter example of it.
 I couldn't figure out it during the contest 😞.

 Summary:
  -

 */

// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG x.cpp && ./a.out
// 25:54 1WA
// 26:25 pause
//const int MAX_N=1e5+1;
vector<LL> A;
int N;

LL solve_wrong1() {
  sort(A.begin(),A.end());
  vector<LL> X,Y;
  REP(i,N) {
    LL x=A[i],y=A[2*N-i-1];
    X.push_back(x),Y.push_back(y);
  }
  sort(X.begin(),X.end()),sort(Y.begin(),Y.end());
//  dumpAR(X);
//  dumpAR(Y);
  LL dx=X.back()-X.front();
  LL dy=Y.back()-Y.front();
//  dump2(dx,dy);
  return dx*dy;
}

LL solve_wrong2() {
  sort(A.begin(),A.end());
  LL dx=abs(A[N-1]-A[0]);
  LL dy=abs(A[2*N-1]-A[N]);
  LL res=dx*dy;
  //  dump2(dx,dy);
  return res;
}

LL solve() {
  sort(A.begin(),A.end());
  LL dx=abs(A[N-1]-A[0]);
  LL dy=abs(A[2*N-1]-A[N]);
  LL res=dx*dy;
  FOR(i,1,N-1) {
    LL dx=A[2*N-1]-A[0],dy=A[i+N-1]-A[i];
    SMIN(res,dx*dy);
  }
  //  dump2(dx,dy);
  return res;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);

  cin>>N;
  A.resize(2*N);
  REP(i,2*N) cin>>A[i];
  cout<<solve()<<endl;

  return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <limits.h>
#include <cstring>
#include <tuple>
#include <cassert>
#include <numeric>
using namespace std;
// type alias
typedef long long LL;
typedef vector < int > VI;
typedef unordered_map < int, int > MAPII;
typedef unordered_set < int > SETI;
typedef pair< int , int > II;
typedef tuple< int, int, int > III;
// repetition
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)
#define REPE(i,n)  for(int i=0;i<=(n);++i)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define FORR(x,arr) for(auto& x:arr)
#define SZ(a) int((a).size())
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// minmax
#define SMAX(a,b) a = max(a,b)
#define SMIN(a,b) a = min(a,b)
// debug cerr
#define TRACE true
#define dump(x) if(TRACE) { cerr << #x << " = " << (x) << endl; }
#define dump2(x,y) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl; }
#define dump3(x,y,z) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << endl; }
#define dump4(x,y,z,a) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << ", " << #a << " = " << (a) << endl; }
#define dumpAR(ar) if(TRACE) { FORR(x,(ar)) { cerr << x << ','; } cerr << endl; }

// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG x.cpp && ./a.out
// 25:54 1WA
const int MAX_N=1e5+1;
LL A[2*MAX_N];
int N;

LL solve() {
  sort(A,A+2*N);
  vector<LL> X,Y;
  REP(i,N) {
    LL x=A[i],y=A[2*N-i-1];
    X.push_back(x),Y.push_back(y);
  }
  sort(X.begin(),X.end()),sort(Y.begin(),Y.end());
//  dumpAR(X);
//  dumpAR(Y);
  LL dx=X.back()-X.front();
  LL dy=Y.back()-Y.front();
//  dump2(dx,dy);
  return dx*dy;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);

  cin>>N;
  REP(i,2*N) cin>>A[i];

  cout<<solve()<<endl;

  return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <limits.h>
#include <cstring>
#include <tuple>
#include <cassert>
#include <numeric>
using namespace std;
// type alias
typedef long long LL;
typedef vector < int > VI;
typedef unordered_map < int, int > MAPII;
typedef unordered_set < int > SETI;
typedef pair< int , int > II;
typedef tuple< int, int, int > III;
// repetition
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)
#define REPE(i,n)  for(int i=0;i<=(n);++i)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define FORR(x,arr) for(auto& x:arr)
#define SZ(a) int((a).size())
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// minmax
#define SMAX(a,b) a = max(a,b)
#define SMIN(a,b) a = min(a,b)
// debug cerr
#define TRACE true
#define dump(x) if(TRACE) { cerr << #x << " = " << (x) << endl; }
#define dump2(x,y) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl; }
#define dump3(x,y,z) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << endl; }
#define dump4(x,y,z,a) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << ", " << #a << " = " << (a) << endl; }
#define dumpAR(ar) if(TRACE) { FORR(x,(ar)) { cerr << x << ','; } cerr << endl; }

/*

 7/31/2018 R500 div2

 25:35-25:54 1WA on test case #3
 25:55-26:25 give up

 Editorials:
  - http://codeforces.com/blog/entry/60920

 Tweets:
  - https://togetter.com/li/1251978
  - https://twitter.com/noimi__/status/1023882923479457792
  - https://twitter.com/satanic0258/status/1023883406822653952

 Suppose we sort numbers and get below sequence:

  a,..,b | c,..,d (a<b<c<d)

 (b-a)*(d-c) seems to be optimal. I showed that (c-a)*(d-b)>=(b-a)*(d-c)
 However that's not sufficient at all. There exists counter example of it.
 I couldn't figure out it during the contest 😞.

 Summary:
  -

 */

// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG x.cpp && ./a.out
// 25:54 1WA
// 26:25 pause
//const int MAX_N=1e5+1;
vector<LL> A;
int N;

LL solve_() {
  sort(A.begin(),A.end());
  vector<LL> X,Y;
  REP(i,N) {
    LL x=A[i],y=A[2*N-i-1];
    X.push_back(x),Y.push_back(y);
  }
  sort(X.begin(),X.end()),sort(Y.begin(),Y.end());
//  dumpAR(X);
//  dumpAR(Y);
  LL dx=X.back()-X.front();
  LL dy=Y.back()-Y.front();
//  dump2(dx,dy);
  return dx*dy;
}

LL solve() {
  sort(A.begin(),A.end());
  LL dx=abs(A[N-1]-A[0]);
  LL dy=abs(A[2*N-1]-A[N]);
  LL res=dx*dy;
  //  dump2(dx,dy);
  return res;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);

  cin>>N;
  A.resize(2*N);
  REP(i,2*N) cin>>A[i];
  cout<<solve()<<endl;

  return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <limits.h>
#include <cstring>
#include <tuple>
#include <cassert>
#include <numeric>
using namespace std;
// type alias
typedef long long LL;
typedef vector < int > VI;
typedef unordered_map < int, int > MAPII;
typedef unordered_set < int > SETI;
typedef pair< int , int > II;
typedef tuple< int, int, int > III;
// repetition
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)
#define REPE(i,n)  for(int i=0;i<=(n);++i)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define FORR(x,arr) for(auto& x:arr)
#define SZ(a) int((a).size())
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// minmax
#define SMAX(a,b) a = max(a,b)
#define SMIN(a,b) a = min(a,b)
// debug cerr
#define TRACE true
#define dump(x) if(TRACE) { cerr << #x << " = " << (x) << endl; }
#define dump2(x,y) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl; }
#define dump3(x,y,z) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << endl; }
#define dump4(x,y,z,a) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << ", " << #a << " = " << (a) << endl; }
#define dumpAR(ar) if(TRACE) { FORR(x,(ar)) { cerr << x << ','; } cerr << endl; }

// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG x.cpp && ./a.out
// 25:54 1WA
const int MAX_N=1e5+1;
LL A[2*MAX_N];
int N;

LL solve_() {
  sort(A,A+2*N);
  vector<LL> X,Y;
  REP(i,N) {
    LL x=A[i],y=A[2*N-i-1];
    X.push_back(x),Y.push_back(y);
  }
  sort(X.begin(),X.end()),sort(Y.begin(),Y.end());
//  dumpAR(X);
//  dumpAR(Y);
  LL dx=X.back()-X.front();
  LL dy=Y.back()-Y.front();
//  dump2(dx,dy);
  return dx*dy;
}

LL solve() {
  sort(A,A+2*N);
  LL dx=abs(A[N-1]-A[0]);
  LL dy=abs(A[2*N-1]-A[N]);
  LL res=dx*dy;
  //  dump2(dx,dy);
  return res;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);

  cin>>N;
  REP(i,2*N) cin>>A[i];

  cout<<solve()<<endl;

  return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <limits.h>
#include <cstring>
#include <tuple>
#include <cassert>
#include <numeric>
using namespace std;
// type alias
typedef long long LL;
typedef vector < int > VI;
typedef unordered_map < int, int > MAPII;
typedef unordered_set < int > SETI;
typedef pair< int , int > II;
typedef tuple< int, int, int > III;
// repetition
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)
#define REPE(i,n)  for(int i=0;i<=(n);++i)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define FORR(x,arr) for(auto& x:arr)
#define SZ(a) int((a).size())
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// minmax
#define SMAX(a,b) a = max(a,b)
#define SMIN(a,b) a = min(a,b)
// debug cerr
#define TRACE true
#define dump(x) if(TRACE) { cerr << #x << " = " << (x) << endl; }
#define dump2(x,y) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl; }
#define dump3(x,y,z) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << endl; }
#define dump4(x,y,z,a) if(TRACE) { cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << ", " << #z << " = " << (z) << ", " << #a << " = " << (a) << endl; }
#define dumpAR(ar) if(TRACE) { FORR(x,(ar)) { cerr << x << ','; } cerr << endl; }

// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG x.cpp && ./a.out
const int MAX_N=1e5+1;
LL A[2*MAX_N];
int N;

LL solve() {
  sort(A,A+2*N);
  VI X,Y;
  REP(i,N) {
    int x=A[i],y=A[2*N-i-1];
    X.push_back(x),Y.push_back(y);
  }
  sort(X.begin(),X.end()),sort(Y.begin(),Y.end());
//  dumpAR(X);
//  dumpAR(Y);
  int dx=X.back()-X.front();
  int dy=Y.back()-Y.front();
//  dump2(dx,dy);
  return dx*dy;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);

  cin>>N;
  REP(i,2*N) cin>>A[i];

  cout<<solve()<<endl;

  return 0;
}


#include <bits/stdc++.h>
#define ll      long long
#define ld      long double
#define pb      push_back
#define mp      make_pair
#define all(x)  x.begin(),x.end()
#define ff      first
#define ss      second
#define pi      acos(-1.0)
using namespace std;
int main(){
	ios::sync_with_stdio(0);
	ll n;
	cin >> n;
	vector <ll> v;
	for (int i = 0; i < 2 * n; i++) {
		ll q;
		cin >> q;
		v.pb(q);
	}
	sort(all(v));
	ll d1 = v[n-1] - v[0];
	ll d2 = v[2*n-1] - v[n];
	ll ans = d1 * d2;
	ll d = v[2*n-1]-v[0];
	for (int i = 0; i < n; i++) {
		ans = min(ans,(v[i+n-1]-v[i])*d);
	}
	cout << ans;
	return 0;

}


#include <bits/stdc++.h>
#define ll      long long
#define ld      long double
#define pb      push_back
#define mp      make_pair
#define all(x)  x.begin(),x.end()
#define ff      first
#define ss      second
#define pi      acos(-1.0)
using namespace std;
int main(){
	ios::sync_with_stdio(0);
	ll n;
	cin >> n;
	vector <ll> v;
	for (int i = 0; i < 2 * n; i++) {
		ll x;
		cin >> x;
		v.pb(x);
	}
	sort(all(v));
	vector <pair<ll,ll>> ans;
	for (int i = v.size()-1; i >= n; i--) {
		ans.pb(mp(v[i-n],v[i]));
	}
	ll d = abs(abs(ans[ans.size()-1].ss) - abs(ans[0].ss));
	ll d1 = abs(abs(ans[ans.size()-1].ff) - abs(ans[0].ff));
	cout << d * d1;
	return 0;

}


#include <bits/stdc++.h>
#define ll      long long
#define ld      long double
#define pb      push_back
#define mp      make_pair
#define all(x)  x.begin(),x.end()
#define ff      first
#define ss      second
#define pi      acos(-1.0)
using namespace std;
int main(){
	ios::sync_with_stdio(0);
	ll n;
	cin >> n;
	vector <ll> v;
	for (int i = 0; i < 2 * n; i++) {
		ll x;
		cin >> x;
		v.pb(x);
	}
	sort(all(v));
	vector <pair<ll,ll>> ans;
	for (int i = v.size()-1; i >= n; i--) {
		ans.pb(mp(v[i-n],v[i]));
	}
	ll d = abs(ans[ans.size()-1].ss - ans[0].ss);
	ll d1 = abs(ans[ans.size()-1].ff - ans[0].ff);
	cout << d * d1;
	return 0;

}


#include <bits/stdc++.h>
#define ll      long long
#define ld      long double
#define pb      push_back
#define mp      make_pair
#define all(x)  x.begin(),x.end()
#define ff      first
#define ss      second
#define pi      acos(-1.0)
using namespace std;
int main(){
	ios::sync_with_stdio(0);
	ll n;
	cin >> n;
	vector <ll> v;
	for (int i = 0; i < 2 * n; i++) {
		ll q;
		cin >> q;
		v.pb(q);
	}
	sort(all(v));
	vector <pair<ll,ll>> ans;
	for (int i = 2 * n - 1; i >= n; i--) {
		ans.pb(mp(v[i-n],v[i]));
	}
	ll d1 = abs(ans[n-1].ff - ans[0].ff);
	ll d2 = abs(ans[n-1].ss - ans[0].ff);
	cout << d1*d2;
	return 0;

}


#include <bits/stdc++.h>
#define ll      long long
#define ld      long double
#define pb      push_back
#define mp      make_pair
#define all(x)  x.begin(),x.end()
#define ff      first
#define ss      second
#define pi      acos(-1.0)
using namespace std;
int main(){
	ios::sync_with_stdio(0);
	ll n;
	cin >> n;
	vector <ll> v;
	for (int i = 0; i < 2 * n; i++) {
		ll q;
		cin >> q;
		v.pb(q);
	}
	sort(all(v));
	vector <pair<ll,ll>> ans;
	for (int i = 2 * n - 1; i >= n; i--) {
		ans.pb(mp(v[i-n],v[i]));
	}
	sort(all(ans));
	ll d1 = abs(ans[n-1].ff - ans[0].ff);
	ll d2 = abs(ans[n-1].ss - ans[0].ss);
	cout << d1*d2;
	return 0;

}


#include <bits/stdc++.h>
#define ll      long long
#define ld      long double
#define pb      push_back
#define mp      make_pair
#define all(x)  x.begin(),x.end()
#define ff      first
#define ss      second
#define pi      acos(-1.0)
using namespace std;
int main(){
	ios::sync_with_stdio(0);
	ll n;
	cin >> n;
	vector <ll> v;
	for (int i = 0; i < 2 * n; i++) {
		ll x;
		cin >> x;
		v.pb(x);
	}
	sort(all(v));
	vector <pair<ll,ll>> ans;
	for (int i = v.size()-1; i >= n; i--) {
		ans.pb(mp(v[i-n],v[i]));
	}
	sort(all(ans));
	ll d = abs(ans[ans.size()-1].ss - ans[0].ss);
	ll d1 = abs(ans[ans.size()-1].ff - ans[0].ff);
	cout << d * d1;
	return 0;

}


#include <bits/stdc++.h>
#define ll      long long
#define ld      long double
#define pb      push_back
#define mp      make_pair
#define all(x)  x.begin(),x.end()
#define ff      first
#define ss      second
#define pi      acos(-1.0)
using namespace std;
int main(){
	ios::sync_with_stdio(0);
	ll n;
	cin >> n;
	vector <ll> v;
	for (int i = 0; i < 2 * n; i++) {
		ll x;
		cin >> x;
		v.pb(x);
	}
	sort(all(v));
	vector <ll> ans1;
	vector <ll> ans2;
	for (int i = v.size()-1; i >= n; i--) {
		ans1.pb(v[i-n]);
		ans2.pb(v[i]);

	}
	sort(all(ans1));
	sort(all(ans2));
	ll d = abs(ans1[ans1.size()-1]-ans1[0]);
	ll d1 = abs(ans2[ans2.size()-1]-ans2[0]);
	cout << d * d1;
	return 0;

}


#include <bits/stdc++.h>
#define ll      long long
#define ld      long double
#define pb      push_back
#define mp      make_pair
#define all(x)  x.begin(),x.end()
#define ff      first
#define ss      second
#define pi      acos(-1.0)
using namespace std;
int main(){
	ios::sync_with_stdio(0);
	ll n;
	cin >> n;
	vector <ll> v;
	for (int i = 0; i < 2 * n; i++) {
		ll x;
		cin >> x;
		v.pb(x);
	}
	sort(all(v));
	vector <pair<ll,ll>> ans;
	for (int i = v.size()-1; i >= n; i--) {
		ans.pb(mp(v[i-n],v[i]));
	}
	sort(all(ans));
	ll d = ans[ans.size()-1].ss - ans[0].ss;
	ll d1 = ans[ans.size()-1].ff - ans[0].ff;
	cout << d * d1;
	return 0;

}


#include <bits/stdc++.h>
#define ll      long long
#define ld      long double
#define pb      push_back
#define mp      make_pair
#define all(x)  x.begin(),x.end()
#define ff      first
#define ss      second
#define pi      acos(-1.0)
using namespace std;
int main(){
	ios::sync_with_stdio(0);
	ll n;
	cin >> n;
	vector <ll> v;
	for (int i = 0; i < 2 * n; i++) {
		ll q;
		cin >> q;
		v.pb(q);
	}
	sort(all(v));
	vector <pair<ll,ll>> ans;
	for (int i = 2 * n - 1; i >= n; i--) {
		ans.pb(mp(v[i-n],v[i]));
	}
	sort(all(ans));
	ll d1 = abs(ans[n-1].ff - ans[0].ff);
	ll d2 = abs(ans[n-1].ss - ans[0].ff);
	cout << d1*d2;
	return 0;

}


#include <bits/stdc++.h>
#define ll      long long
#define ld      long double
#define pb      push_back
#define mp      make_pair
#define all(x)  x.begin(),x.end()
#define ff      first
#define ss      second
#define pi      acos(-1.0)
using namespace std;
int main(){
	ios::sync_with_stdio(0);
	ll n;
	cin >> n;
	vector <ll> v;
	for (int i = 0; i < 2 * n; i++) {
		ll q;
		cin >> q;
		v.pb(q);
	}
	sort(all(v));
	vector <pair<ll,ll>> ans;
	ll min1 = 1e18;
	for (int i = 2 * n - 1; i >= n; i--) {
		ans.pb(mp(v[i-n],v[i]));
		min1 = min(min1,v[i]-v[i-n]);
	}
	sort(all(ans));
	ll d1 = abs(ans[n-1].ff - ans[0].ff);
	ll d2 = abs(ans[n-1].ss - ans[0].ss);
	ll f = d1 * d2;
	cout << min(f,min1*(v[2*n-1]-v[0]));
	return 0;

}


#include<bits/stdc++.h>

using namespace std;

#include <ext/rope>
using namespace __gnu_cxx;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define int long long

typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef map<string, int> MAPS;
typedef map<char, int> MAPC;
typedef map<int, int> MAPI;
typedef set<int> SETI;
typedef set<string> SETS;
typedef set<char> SETC;
typedef complex<double> POINT;
typedef tree<int, int, less<int>, rb_tree_tag,
		tree_order_statistics_node_update> MAP_T;
typedef trie<string, null_type, trie_string_access_traits<>,
		pat_trie_tag, trie_prefix_search_node_update> TRIE;

#define add push_back
#define rem pop_back
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define SZ(x) int((x).size())
#define F first
#define S second
#define NEW(x, y, z) x y; x::iterator z;

void INPUT(int *a, int size)  { for(int i = 0; i < size; ++i) cin >> a[i]; }
void OUTPUT(int *a, int size) { for(int i = 0; i < size; ++i) cout << a[i] << " "; cout << endl;}

#define REPI(it, x) for(__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define REP(i, a, b)  for(int i = a; i <  b; i++)
#define REPN(i, a, b) for(int i = a; i <= b; i++)
#define REPV(i, b, a) for(int i = b; i >= a; i--)

const double EPS = 1e-9;
const double PI = acos(-1.);
const int MOD = 1e9 + 7;
const int MAXN = 500001;
int INF = __INT64_MAX__;
int MAX = -1e16;
int MIN = 1e16;
string YN[] = {"NO", "YES"};

#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) ((a)*((b)/gcd(a,b)))

template<typename T1, typename T2> T2 max(T1 a, T2 b) { T2 res = a > b ? a : b; return res; }
template<typename T1, typename T2> T2 min(T1 a, T2 b) { T2 res = a < b ? a : b; return res; }

int POW (int a, int n)
{
		int res = 1;
		while (n) {
				if (n & 1)
						res *= a;
				a *= a;
				n >>= 1;
		}
		return res;
}

string to_string(int n)
{
		stringstream ss;
		string s;
		ss << n;
		ss >> s;
		return s;
}

string to_binary(int n)
{
		string s;
		while(n) {
				s += (n & 1) + '0';
				n >>= 1;
		}
		reverse(ALL(s));
		return s;
}

int GCD_E(int a, int b, int& x, int& y)
{
		if (!a) {
				x = 0;
				y = 1;
				return b;
		}
		int x1, y1;
		int d = GCD_E(b % a, a, x1, y1);
		x = y1 - (b / a) * x1;
		y = x1;
		return d;
}

inline int addMOD(int a, int b, int m = MOD)
{
		return (a + b) % m;
}

inline int mulMOD(int a, int b, int m = MOD)
{
		return (a * b) % m;
}

inline int divMOD(int a, int b, int m = MOD)
{
		int x, y;
		int g = GCD_E(b, m, x, y);
		x = (x % m + m) % m;
		return mulMOD(a, x, m);
}

int fact[MAXN];
inline int C(int k, int n)
{
		return divMOD(fact[n], mulMOD(fact[n - k], fact[k]));
}

int px[] = { 1, 1, -1, -1 };
int py[] = { -1, 1, -1, 1};
int dx[] = { 1, 0, -1, 0, 1, 1, -1, -1 };
int dy[] = { 0, 1, 0, -1, 1, -1, 1, -1 };
int fx[] = {-2, -2, -1, -1,  1,  1,  2,  2};
int fy[] = {-1,  1, -2,  2, -2,  2, -1,  1};

int n, m, k, cnt, res;
int A[MAXN], B[MAXN];
string s, t;
MAPI mp;

void solution()
{
		cin >> n;
		REPN(i, 1, 2 * n){
			cin >> A[i];
		}

		sort(A + 1, A + 1 + 2 * n);
		REP(i, 2, n){
			res = (A[i + n - 1] - A[i]) * (A[2 * n] - A[1]);
			MIN = min(MIN, res);
		}
		int a = A[n] - A[1];
		int b = A[2 * n] - A[n + 1];
		MIN = min(MIN, a * b);
		cout << MIN;

}

__INT16_C() main()
{
		//ifstream fin("input.in");
		//ofstream fout("output.out");

		ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);

		int t = 1;
		// cin >> t;

		while(t--) solution();
}


#include<bits/stdc++.h>

using namespace std;

#include <ext/rope>
using namespace __gnu_cxx;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define int long long

typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef map<string, int> MAPS;
typedef map<char, int> MAPC;
typedef map<int, int> MAPI;
typedef set<int> SETI;
typedef set<string> SETS;
typedef set<char> SETC;
typedef complex<double> POINT;
typedef tree<int, int, less<int>, rb_tree_tag,
		tree_order_statistics_node_update> MAP_T;
typedef trie<string, null_type, trie_string_access_traits<>,
		pat_trie_tag, trie_prefix_search_node_update> TRIE;

#define add push_back
#define rem pop_back
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define SZ(x) int((x).size())
#define F first
#define S second
#define NEW(x, y, z) x y; x::iterator z;

void INPUT(int *a, int size)  { for(int i = 0; i < size; ++i) cin >> a[i]; }
void OUTPUT(int *a, int size) { for(int i = 0; i < size; ++i) cout << a[i] << " "; cout << endl;}

#define REPI(it, x) for(__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define REP(i, a, b)  for(int i = a; i <  b; i++)
#define REPN(i, a, b) for(int i = a; i <= b; i++)
#define REPV(i, b, a) for(int i = b; i >= a; i--)

const double EPS = 1e-9;
const double PI = acos(-1.);
const int MOD = 1e9 + 7;
const int MAXN = 500001;
int INF = __INT64_MAX__;
int MAX = -1e16;
int MIN = 1e16;
string YN[] = {"NO", "YES"};

#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) ((a)*((b)/gcd(a,b)))

template<typename T1, typename T2> T2 max(T1 a, T2 b) { T2 res = a > b ? a : b; return res; }
template<typename T1, typename T2> T2 min(T1 a, T2 b) { T2 res = a < b ? a : b; return res; }

int POW (int a, int n)
{
		int res = 1;
		while (n) {
				if (n & 1)
						res *= a;
				a *= a;
				n >>= 1;
		}
		return res;
}

string to_string(int n)
{
		stringstream ss;
		string s;
		ss << n;
		ss >> s;
		return s;
}

string to_binary(int n)
{
		string s;
		while(n) {
				s += (n & 1) + '0';
				n >>= 1;
		}
		reverse(ALL(s));
		return s;
}

int GCD_E(int a, int b, int& x, int& y)
{
		if (!a) {
				x = 0;
				y = 1;
				return b;
		}
		int x1, y1;
		int d = GCD_E(b % a, a, x1, y1);
		x = y1 - (b / a) * x1;
		y = x1;
		return d;
}

inline int addMOD(int a, int b, int m = MOD)
{
		return (a + b) % m;
}

inline int mulMOD(int a, int b, int m = MOD)
{
		return (a * b) % m;
}

inline int divMOD(int a, int b, int m = MOD)
{
		int x, y;
		int g = GCD_E(b, m, x, y);
		x = (x % m + m) % m;
		return mulMOD(a, x, m);
}

int fact[MAXN];
inline int C(int k, int n)
{
		return divMOD(fact[n], mulMOD(fact[n - k], fact[k]));
}

int px[] = { 1, 1, -1, -1 };
int py[] = { -1, 1, -1, 1};
int dx[] = { 1, 0, -1, 0, 1, 1, -1, -1 };
int dy[] = { 0, 1, 0, -1, 1, -1, 1, -1 };
int fx[] = {-2, -2, -1, -1,  1,  1,  2,  2};
int fy[] = {-1,  1, -2,  2, -2,  2, -1,  1};

int n, m, k, cnt, res;
int A[MAXN], B[MAXN];
string s, t;
MAPI mp;

void solution()
{
		cin >> n;
		REPN(i, 1, 2 * n){
			cin >> A[i];
			mp[A[i]]++;
			if(mp[A[i]] >= n){
				cout << 0;
				return;
			}
		}
		int temp, tmp;
		sort(A + 1, A + 1 + 2 * n);
		for(auto it = mp.begin(); it != mp.end(); it++){
			cnt += it -> second;
			if(cnt >= n){
				temp = it -> first;
				it++;
				tmp = it -> first;
				break;
			}
		}
		cout << (temp - A[1]) * (A[2 * n] - tmp);

}

__INT16_C() main()
{
		//ifstream fin("input.in");
		//ofstream fout("output.out");

		ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);

		int t = 1;
		// cin >> t;

		while(t--) solution();
}


#include<bits/stdc++.h>

using namespace std;

#include <ext/rope>
using namespace __gnu_cxx;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define int long long

typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef map<string, int> MAPS;
typedef map<char, int> MAPC;
typedef map<int, int> MAPI;
typedef set<int> SETI;
typedef set<string> SETS;
typedef set<char> SETC;
typedef complex<double> POINT;
typedef tree<int, int, less<int>, rb_tree_tag,
		tree_order_statistics_node_update> MAP_T;
typedef trie<string, null_type, trie_string_access_traits<>,
		pat_trie_tag, trie_prefix_search_node_update> TRIE;

#define add push_back
#define rem pop_back
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define SZ(x) int((x).size())
#define F first
#define S second
#define NEW(x, y, z) x y; x::iterator z;

void INPUT(int *a, int size)  { for(int i = 0; i < size; ++i) cin >> a[i]; }
void OUTPUT(int *a, int size) { for(int i = 0; i < size; ++i) cout << a[i] << " "; cout << endl;}

#define REPI(it, x) for(__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define REP(i, a, b)  for(int i = a; i <  b; i++)
#define REPN(i, a, b) for(int i = a; i <= b; i++)
#define REPV(i, b, a) for(int i = b; i >= a; i--)

const double EPS = 1e-9;
const double PI = acos(-1.);
const int MOD = 1e9 + 7;
const int MAXN = 500001;
int INF = __INT64_MAX__;
int MAX = -1e16;
int MIN = 1e16;
string YN[] = {"NO", "YES"};

#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) ((a)*((b)/gcd(a,b)))

template<typename T1, typename T2> T2 max(T1 a, T2 b) { T2 res = a > b ? a : b; return res; }
template<typename T1, typename T2> T2 min(T1 a, T2 b) { T2 res = a < b ? a : b; return res; }

int POW (int a, int n)
{
		int res = 1;
		while (n) {
				if (n & 1)
						res *= a;
				a *= a;
				n >>= 1;
		}
		return res;
}

string to_string(int n)
{
		stringstream ss;
		string s;
		ss << n;
		ss >> s;
		return s;
}

string to_binary(int n)
{
		string s;
		while(n) {
				s += (n & 1) + '0';
				n >>= 1;
		}
		reverse(ALL(s));
		return s;
}

int GCD_E(int a, int b, int& x, int& y)
{
		if (!a) {
				x = 0;
				y = 1;
				return b;
		}
		int x1, y1;
		int d = GCD_E(b % a, a, x1, y1);
		x = y1 - (b / a) * x1;
		y = x1;
		return d;
}

inline int addMOD(int a, int b, int m = MOD)
{
		return (a + b) % m;
}

inline int mulMOD(int a, int b, int m = MOD)
{
		return (a * b) % m;
}

inline int divMOD(int a, int b, int m = MOD)
{
		int x, y;
		int g = GCD_E(b, m, x, y);
		x = (x % m + m) % m;
		return mulMOD(a, x, m);
}

int fact[MAXN];
inline int C(int k, int n)
{
		return divMOD(fact[n], mulMOD(fact[n - k], fact[k]));
}

int px[] = { 1, 1, -1, -1 };
int py[] = { -1, 1, -1, 1};
int dx[] = { 1, 0, -1, 0, 1, 1, -1, -1 };
int dy[] = { 0, 1, 0, -1, 1, -1, 1, -1 };
int fx[] = {-2, -2, -1, -1,  1,  1,  2,  2};
int fy[] = {-1,  1, -2,  2, -2,  2, -1,  1};

int n, m, k, cnt, res;
int A[MAXN], B[MAXN];
string s, t;
MAPI mp;

void solution()
{
		cin >> n;
		REPN(i, 1, 2 * n){
			cin >> A[i];
			mp[A[i]]++;
		}
		int temp, tmp;
		sort(A + 1, A + 1 + 2 * n);
		for(auto it = mp.begin(); it != mp.end(); it++){
			cnt += it -> second;
			if(cnt >= n){
				temp = it -> first;
				it++;
				tmp = it -> first;
				break;
			}
		}
		cout << temp << " " << tmp << endl;
		cout << min((A[2 * n] - temp) * (tmp - A[1]), (A[2 * n] - tmp) * (temp - A[1]));

}

__INT16_C() main()
{
		//ifstream fin("input.in");
		//ofstream fout("output.out");

		ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);

		int t = 1;
		// cin >> t;

		while(t--) solution();
}


#include<bits/stdc++.h>

using namespace std;

#include <ext/rope>
using namespace __gnu_cxx;

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define int long long

typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef map<string, int> MAPS;
typedef map<char, int> MAPC;
typedef map<int, int> MAPI;
typedef set<int> SETI;
typedef set<string> SETS;
typedef set<char> SETC;
typedef complex<double> POINT;
typedef tree<int, int, less<int>, rb_tree_tag,
		tree_order_statistics_node_update> MAP_T;
typedef trie<string, null_type, trie_string_access_traits<>,
		pat_trie_tag, trie_prefix_search_node_update> TRIE;

#define add push_back
#define rem pop_back
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define SZ(x) int((x).size())
#define F first
#define S second
#define NEW(x, y, z) x y; x::iterator z;

void INPUT(int *a, int size)  { for(int i = 0; i < size; ++i) cin >> a[i]; }
void OUTPUT(int *a, int size) { for(int i = 0; i < size; ++i) cout << a[i] << " "; cout << endl;}

#define REPI(it, x) for(__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define REP(i, a, b)  for(int i = a; i <  b; i++)
#define REPN(i, a, b) for(int i = a; i <= b; i++)
#define REPV(i, b, a) for(int i = b; i >= a; i--)

const double EPS = 1e-9;
const double PI = acos(-1.);
const int MOD = 1e9 + 7;
const int MAXN = 500001;
int INF = __INT64_MAX__;
int MAX = -1e16;
int MIN = 1e18;
string YN[] = {"NO", "YES"};

#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) ((a)*((b)/gcd(a,b)))

template<typename T1, typename T2> T2 max(T1 a, T2 b) { T2 res = a > b ? a : b; return res; }
template<typename T1, typename T2> T2 min(T1 a, T2 b) { T2 res = a < b ? a : b; return res; }

int POW (int a, int n)
{
		int res = 1;
		while (n) {
				if (n & 1)
						res *= a;
				a *= a;
				n >>= 1;
		}
		return res;
}

string to_string(int n)
{
		stringstream ss;
		string s;
		ss << n;
		ss >> s;
		return s;
}

string to_binary(int n)
{
		string s;
		while(n) {
				s += (n & 1) + '0';
				n >>= 1;
		}
		reverse(ALL(s));
		return s;
}

int GCD_E(int a, int b, int& x, int& y)
{
		if (!a) {
				x = 0;
				y = 1;
				return b;
		}
		int x1, y1;
		int d = GCD_E(b % a, a, x1, y1);
		x = y1 - (b / a) * x1;
		y = x1;
		return d;
}

inline int addMOD(int a, int b, int m = MOD)
{
		return (a + b) % m;
}

inline int mulMOD(int a, int b, int m = MOD)
{
		return (a * b) % m;
}

inline int divMOD(int a, int b, int m = MOD)
{
		int x, y;
		int g = GCD_E(b, m, x, y);
		x = (x % m + m) % m;
		return mulMOD(a, x, m);
}

int fact[MAXN];
inline int C(int k, int n)
{
		return divMOD(fact[n], mulMOD(fact[n - k], fact[k]));
}

int px[] = { 1, 1, -1, -1 };
int py[] = { -1, 1, -1, 1};
int dx[] = { 1, 0, -1, 0, 1, 1, -1, -1 };
int dy[] = { 0, 1, 0, -1, 1, -1, 1, -1 };
int fx[] = {-2, -2, -1, -1,  1,  1,  2,  2};
int fy[] = {-1,  1, -2,  2, -2,  2, -1,  1};

int n, m, k, cnt, res;
int A[MAXN], B[MAXN];
string s, t;
MAPI mp;

void solution()
{
		cin >> n;
		REPN(i, 1, 2 * n){
			cin >> A[i];
		}

		sort(A + 1, A + 1 + 2 * n);
		REPN(i, 2, n){
			res = (A[i + n - 1] - A[i]) * (A[2 * n] - A[1]);
			MIN = min(MIN, res);
		}
		int a = A[n] - A[1];
		int b = A[2 * n] - A[n + 1];
		MIN = min(MIN, a * b);
		cout << MIN;

}

__INT16_C() main()
{
		//ifstream fin("input.in");
		//ofstream fout("output.out");

		ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);

		int t = 1;
		// cin >> t;

		while(t--) solution();
}