#include
#include
using namespace std;
double s(double x, double y, double z)
{
double p = (x + y + z) / 2;
return sqrt(p*(p - x)*(p - y)*(p - z));
}
double l(double x, double y, double x1, double y1)
{
return sqrt((x - x1)*(x - x1) + (y - y1)*(y - y1));
}
int main()
{
double x, y, x1, y1, x2, y2, x3, y3,n,ans=0;
cin >> x >> y >> x1 >> y1 >> x2 >> y2>>n;
double len1 = l(x, y, x1, y1); //ab
double len2 = l(x1, y1, x2, y2); //bc
double len3 = l(x, y, x2, y2); // ac
double s1 = s(len1, len2, len3);//s(ab,bc,ac)
for(int i=0;i{
cin >> x3 >> y3;
double len4 = l(x, y, x3, y3); //at
double len5 = l(x1, y1, x3, y3);//bt
double len6 = l(x2, y2, x3, y3);//ct
double s2 = s(len1, len4, len5);//s(ab,bc,)
double s3 = s(len3, len4, len6);
double s4 = s(len6, len5, len2);
if (abs(s1 - (s2 + s3 + s4)) < 0.000001)
ans++;
}
cout << ans;<br> return 0;
}