#898
Silver IV
JABUKE
시간 제한
1s
메모리 제한
32MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Ante bought a piece of land. The land contains N apple trees, but his piece is triangular and it is not easy for him to determine which apple trees belong to him. Your program will be given the coordinates of the vertices of the triangle forming Ante's piece, and the coordinates of all apple trees. Determine the area of land belonging to Ante, and the number of trees belonging to him. We consider apple trees on the very border of his piece to belong to him. The area of a triangle with vertices (xA, yA), (xB, yB) and (xC, yC) is given by the following formula:

2 ) ( ) ( ) ( B A C A C B C B A y y x y y x y y x − + − + −

입력

The first three lines contain the coordinates of the vertices of the triangle. The following line contains the integer N (1 ≤ N ≤ 100), the number of apple trees. Each of the following N lines contains the coordinates of one apple tree. All coordinates are pairs of positive integers less than 1000, separated by a space.

출력

Output the area of land belonging to Ante on the first line, with one digit after the decimal point. Output the number of tree belonging to Ante on the second line.

예제 입력 1

1 1
5 1
3 3
4
3 1
3 2
3 3
3 4

예제 출력 1

4.0
3

예제 입력 2

3 2
5 4
1 6
3
2 4
3 5
4 3

예제 출력 2

6.0
3

예제 입력 3

2 6
5 1
7 8
5
1 4
3 5
6 4
6 5
4 7

예제 출력 3

15.5
2
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Silver IV1명 투표· 약 1개월 전
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.