페이지가 로드되지 않나요? 여기를 눌러보면 고쳐질 수도 있어요.
Placeholder

#3863

Cow Curling 1000초 128MB

문제


입력

* Line 1: The integer N.

* Lines 2..1+N: Each line contains 2 integers specifying the x and y coordinates of a stone for team A (each coordinate lies in the range -40,000 .. +40,000).

* Lines 2+N..1+2N: Each line contains 2 integers specifying the x and y coordinates of a stone for team B (each coordinate lies in the range -40,000 .. +40,000).


출력

* Line 1: Two space-separated integers, giving the scores for teams A and B.


예제1

입력
4
00
02
20
22
11
110
-103
103
출력
12

Input Details

Each team owns 4 stones. Team A has stones at (0,0), (0,2), (2,0), and (2,2), and team B has stones at (1,1), (1,10), (-10,3), and (10,3).

Output Details

Team A captures their opponent's stone at (1,1). Team B captures their opponent's stones at (0,2) and (2,2).


출처

USACO 2014 January Gold

역링크 공식 문제집만