program PointsOnALine; uses crt; type point = record px:integer; py:integer; end; var infile,outfile:text; z,w:integer; N:integer; points:array[1..1000] of point; p1x,p1y,p2x,p2y:integer; pointcounter:integer; slopep1p2, slope:real; c1,c2:integer; undef1, undef2:boolean; begin assign(infile,'DATA11.txt'); reset(infile); assign(outfile,'OUT11.txt'); rewrite(outfile); readln(infile,N); for z:=1 to N do begin readln(infile,c1,c2); points[z].px := c1; points[z].py := c2; end; for z:=1 to 5 do begin readln(infile,p1x,p1y,p2x,p2y); undef1:=false; if p2x-p1x = 0 then undef1 := true else slopep1p2 := (p2y-p1y)/(p2x-p1x); pointcounter:=0; for w:=1 to N do begin undef2 := false; if p2x - points[w].px = 0 then undef2 := true else slope := (p2y-points[w].py)/(p2x-points[w].px); if (undef1 = true) and (undef2 = true) then inc(pointcounter) else begin if (undef1 = false) and (undef2 = false) then if slope = slopep1p2 then inc(pointcounter); end; end; writeln(outfile,pointcounter); end; close(infile); close(outfile); end.