im getting wrong answer
#include <bits/stdc++.h>
#define ll unsigned long long int
#define pb emplace_back
#define mp make_pair
#define pii pair<ll,ll>
#define vi vector
#define all(v) (v).begin(),(v).end()
using namespace std;
int main(){
ll w=15,h=8,n;
cin>>n;
vector hv;
vector wv;
for(ll i=0;i<n;i++)
{ll a,b;
cin>>a>>b;
wv.push_back(a);
hv.push_back(b);
}
sort(all(wv));
sort(all(hv));
vector<ll> wd;vector<ll> hd;
for(ll i=0;i<wv.size()-1;i++)
{wd.push_back(wv[i+1]-wv[i]-1);
hd.push_back(hv[i+1]-hv[i]-1);
}
cout<<(*max_element(all(wd)))*(*max_element(all(hd)))<<endl;
return 0;
}