// 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
