#include <bits/stdc++.h>

using namespace std;

#define ll long long
const ll INF=1e9,LINF=1e18,MOD=1e9+7;
#define fi first
#define se second
#define pii pair<int,int>
#define mid ((l+r)/2)
#define sz(a) (int((a).size()))
#define all(a) a.begin(),a.end()
#define endl "\n"
#define PRINT(x) cerr<<#x<<'='<<x<<endl;
#define pb push_back
#define PRINTvec(x) { cerr<<#x<<"="; for(int i=0;i<sz(x);i++) cerr<<x[i]<<" "; cerr<<endl; }

void Solve(){
    int M; cin>>M;
    if(M<=100){
        vector<int> xs,ys;
        vector<pii> t;
        ll res=0;
        for(int i=1;i<=M;i++){
            int x,y; cin>>x>>y;
            xs.pb(x); ys.pb(y); t.pb({x,y});
            for(int x1:xs){
                for(int y1:ys){
                    ll sum=0;
                    for(pii p:t){
                        sum+=abs(x1-p.fi)*abs(y1-p.se);
                        if(sum>=MOD) sum%=MOD;
                    }
                    res=max(res,sum);
                }
            }
            cout<<res<<endl;
        }
    }
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t;
    //cin>>t;
    t=1;
    while(t--){
        Solve();
    }
    return 0;
}