#include <bits/stdc++.h>
using namespace std;
double povrsina(int x1,int y1,int x2,int y2,int x3,int y3){
   return abs((x1*(y2-y3)+x2*(y3-y1)+x3*(y1-y2))/2.0);
}
bool nmp(int x1,int y1,int x2,int y2,int x3,int y3)
{
   float P = povrsina(x1, y1, x2, y2, x3, y3);
   float P1 = povrsina(0, 0, x2, y2, x3, y3);
   float P2 = povrsina (x1, y1, 0, 0, x3, y3);
   float P3 =  povrsina(x1, y1, x2, y2, 0, 0);
   return (P==P1+P2+P3);
}
int main()
{
    int n;
    cin>>n;
    int x1,y1,x2,y2,x3,y3;
    cin>>x1>>y1;
    cin>>x2>>y2;
    cin>>x3>>y3;
    cout<<(nmp(x1,y1,x2,y2,x3,y3));
}