Олимпиадный тренинг

Задача 21771. Pickup Master


Venceslav recently read a new pickup book and now he wants to test his knowledge in the park. For simplicity, let's imagine the park as a set of paths, which are segments on a plane. Wenceslas has already walked in this park, and he knows which girl is walking along which path. The problem is that Wenceslas is very lazy and only walks along one path. And he is also too lazy to find out what kind of girls he can meet along the way, and therefore he asked You, his best friend, to help him in this difficult matter.
 
Input
The first line contains the coordinates of the ends of the path (X1, Y1) and ( X2, Y2), along which Wenceslas walks (\(- 20 <= X1, Y1, X2, Y2 <= 20\)).
The second line contains an integer N - the number of paths the girls walk along (\(0 <= N <= 5\)< /span>).
In the following N lines, enter the coordinates of the ends of the paths along which the girls walk (Xi1, Yi1< /sub>) and (Xi2, Yi2), by i -th path walking i-th girl (\(-20 <= X_{i1}, Y_{i1}, X_{i2 }, Y_{i2} <= 20\))
 
Output
In the first line print the number M - the number of girls whose paths will intersect with the path of Wenceslas (touching the paths is considered an intersection).
In the second line print M numbers - numbers of girls our hero will meet. Girls are numbered starting from one!
 
Examples
# Input Output
1
0 0 2 2
1
0 2 2 0
1
1