// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <cmath>
#include <iomanip>
#define dibs reserve
#define OVER9000 1234567890
#define patkan 9
#define tisic 47
#define soclose 1e-9
#define pi 3.1415926535898
#define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
#define chocolate win
#define ff first
#define ss second
#define abs(x) ((x < 0)?-(x):(x))
#define uint unsigned int
// mylittlepony
using namespace std;
struct point {
long long x,y;
bool operator<(const point &P) const {
if(x != P.x) return x < P.x;
return y < P.y;}
};
int sig(long long x) {
if(x > 0) return 1;
if(x == 0) return 0;
return -1;}
long long vs(point A, point B, point O) {
return (A.x-O.x)*(B.y-O.y)-(A.y-O.y)*(B.x-O.x);}
int main() {
// freopen("curling.in","r",stdin);
// freopen("curling.out","w",stdout);
int N;
scanf(" %d",&N);
vector<point> P[2];
for(int i =0; i < 2; i++) {
P[i].resize(N);
for(int j =0; j < N; j++) scanf(" %lld %lld",&P[i][j].x,&P[i][j].y);}
vector<point> H[2][2];
for(int k =0; k < 2; k++) {
sort(P[k].begin(),P[k].end());
H[k][0].push_back(P[k][0]); // body nad
H[k][1].push_back(P[k][0]); // body pod
for(int i =1; i < N; i++) {
if(vs(P[k][N-1],P[k][i],P[k][0]) >= 0) {
while(H[k][0].size() > 1 && vs(*H[k][0].rbegin(),P[k][i],H[k][0][H[k][0].size()-2]) >= 0)
H[k][0].pop_back();
H[k][0].push_back(P[k][i]);}
if(vs(P[k][N-1],P[k][i],P[k][0]) <= 0) {
while(H[k][1].size() > 1 && vs(*H[k][1].rbegin(),P[k][i],H[k][1][H[k][1].size()-2]) <= 0)
H[k][1].pop_back();
H[k][1].push_back(P[k][i]);}
}
// for(int i =0; i < H[k][0].size(); i++) cout << H[k][0][i].x << " " << H[k][0][i].y << " " << k << " " << 0 << "\n";
// for(int i =0; i < H[k][1].size(); i++) cout << H[k][1][i].x << " " << H[k][1][i].y << " " << k << " " << 1 << "\n";
}
for(int k =1; k >= 0; k--) {
int ans =0;
int L[2] ={0,0}; // priamka nad, pod v kazdej polovici
// najpravsi bod nie vpravo od nasho
for(int i =0; i < N; i++) {
while(L[0] < (int)H[1-k][0].size()-1 && H[1-k][0][L[0]+1].x <= P[k][i].x) L[0]++;
while(L[1] < (int)H[1-k][1].size()-1 && H[1-k][1][L[1]+1].x <= P[k][i].x) L[1]++;
bool b =false;
for(int j =max(0,L[0]-2); j <= min((int)H[1-k][0].size()-2,L[0]+2); j++)
if(vs(H[1-k][0][j+1],P[k][i],H[1-k][0][j]) <= 0)
if(H[1-k][0][j].x <= P[k][i].x && H[1-k][0][j+1].x >= P[k][i].x) b =true;
if(!b) continue;
b =false;
for(int j =max(0,L[1]-2); j <= min((int)H[1-k][1].size()-2,L[1]+2); j++)
if(vs(H[1-k][1][j+1],P[k][i],H[1-k][1][j]) >= 0)
if(H[1-k][1][j].x <= P[k][i].x && H[1-k][1][j+1].x >= P[k][i].x) b =true;
if(b) ans++;}
printf("%d",ans);
if(k == 1) printf(" ");
else printf("\n");}
return 0;}
// look at my code
// my code is amazing
Ly8gaW9zdHJlYW0gaXMgdG9vIG1haW5zdHJlYW0KI2luY2x1ZGUgPGNzdGRpbz4KLy8gYml0Y2ggcGxlYXNlCiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPHNldD4KI2luY2x1ZGUgPG1hcD4KI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHF1ZXVlPgojaW5jbHVkZSA8c3RhY2s+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDxjbWF0aD4KI2luY2x1ZGUgPGlvbWFuaXA+CiNkZWZpbmUgZGlicyByZXNlcnZlCiNkZWZpbmUgT1ZFUjkwMDAgMTIzNDU2Nzg5MAojZGVmaW5lIHBhdGthbiA5CiNkZWZpbmUgdGlzaW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