We have to find out which lines intersect the positive half axis of $x$.
According to this formula we can determine if the angle between two points $(A[x_1, y_1]$ and $B[x_2, y_2]$ ) of the line ($\angle AOB$ where $O$ is the center point of the coordinate system) is less than $180^\circ$:
if $(y_1<0)$ then if $x_2y_1-x_1y_2>0$ then the $\text{angle} < 180^\circ$
if $(y_1 > 0)$ then if $x_2y_1-x_1y_2<0$ then the $\text{angle} < 180^\circ$
My question is how did we get this formula?