implicit real*8(a-h,o-z)
dimension x(2000),y(2000)
        n=36
        do i=1, n
		read*, x(i),y(i)
		end do
		!
		p=23
		omomi=1.d-1
		do ip=1,100
		p=p-omomi*real(ip)
		print*,"p=",p
		sei=0.d0
		hu=0.d0
		do i=1,n
		if(y(i)-p>0.d0) then
		sei=sei+y(i)-p
		else
		hu=hu+y(i)-p
		end if
		end do
		print*, sei, hu
		end do
		end
