#include <stdio.h>
#include <stdlib.h>
#include <math.h>

long long povrsina(int x[], int y[], int n)
{
    long long P = 0;
    for(int i = 0; i < n; i++)
    {
        int j = (i + 1) % n;
        P = P + (long long)x[i] * y[j] - (long long)y[i] * x[j];
    }
    P = abs(P) / 2;
    return P;
}
void sort(int x[], int y[], int n)
{
    for(int i = 0; i < n - 1; i++)
    {
        for(int j = i + 1; j < n; j++)
        {
            if(y[i] > y[j] || (y[i] == y[j] && x[i] > x[j]))
            {
                int pom = x[i];
                x[i] = x[j];
                x[j] = pom;
            }
        }
    }
}
int main()
{
    int n;
    printf("Unesi n\n");
    scanf("%d", &n);
    int x[n], y[n];
    printf("Unesi niz x\n");
    for(int i = 0; i < n; i++)
        scanf("%d", &x[i]);
    for(int i = 0; i < n; i++)
        scanf("%d", &y[i]);
    int max = 0;
    for(int i = 0; i < n; i++)
    {
        int novoX[n - 1];
        int novoY[n - 1];
        int k = 0;
        for(int j = 0; j < n; j++)
        {
            if(i != j)
            {
                novoX[k] = x[j];
                novoY[k++] = y[j];
            }
        }
        sort(novoX, novoY, n-1);
        long long P = povrsina(novoX, novoY, n-1);
        if(P > max)
            max = P;
    }
    printf("Povrsina je %lld\n", max);
    return 0;
}