시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 217 81 72 37.113%

문제

백준이는 사과나무가 N개 심어져있는 땅의 일부를 구매했다. 백준이가 구매한 땅은 삼각형이다. 따라서, 어떤 사과나무가 백준이의 것인지 알기가 힘들었다.

백준이 땅의 꼭지점 좌표와 사과나무의 좌표가 주어졌을 때, 백준이 땅의 넓이와 백준이의 사과나무의 개수를 구하는 프로그램을 작성하시오.

만약, 어떤 사과나무가 땅의 경계선에 걸쳐있다면, 이것은 백준이 사과나무이다.

(xA,yA), (xB,yB), (xC,yC) 로 이루어진 삼각형의 넓이는 다음과 같이 구할 수 있다.

|xA(yB-yC)+xB(yC-yA)+xC(yA-yB)| / 2

입력

처음 세 개의 줄은 삼각형의 꼭지점 좌표이다. 다음 줄에는 사과나무의 개수 N이 주어진다. (1 ≤ N ≤ 100). 다음 N개의 줄에는 사과나무의 좌표가 주어진다.

모든 좌표는 1,000보다 작거나 같은 양의 정수이고, 공백으로 구분되어져 있다.

출력

첫째 줄에는 백준이 땅의 넓이를 소수점 첫째자리까지 출력하고, 둘재 줄에는 백준이의 사과나무 개수를 출력한다.

예제 입력 1

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

예제 출력 1

4.0
3
W3sicHJvYmxlbV9pZCI6IjI5ODciLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWMwYWNcdWFjZmNcdWIwOThcdWJiMzQiLCJkZXNjcmlwdGlvbiI6IjxwPlxyXG5cdFx1YmMzMVx1YzkwMFx1Yzc3NFx1YjI5NCBcdWMwYWNcdWFjZmNcdWIwOThcdWJiMzRcdWFjMDAgTlx1YWMxYyBcdWMyZWNcdWM1YjRcdWM4MzhcdWM3ODhcdWIyOTQgXHViNTQ1XHVjNzU4IFx1Yzc3Y1x1YmQ4MFx1Yjk3YyBcdWFkNmNcdWI5ZTRcdWQ1ODhcdWIyZTQuIFx1YmMzMVx1YzkwMFx1Yzc3NFx1YWMwMCBcdWFkNmNc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