#include <cstdio>
#include <iostream>
#include <complex>
#define rep(i,n) for(int i=0; i<(n); i++)
#define EPS 1e-10
using namespace std;

typedef complex<double> cd;

double s(cd a, cd b){
  return abs(a.real()*b.imag()-a.imag()*b.imag());
}

int main(){
  cd a[4];

  for(;;){
    rep(i,4){
      double x,y;
      if(!~scanf(" %lf %lf", &x,&y))
        return 0;
      a[i]=cd(x,y);
    }
    
    if( abs(
            s(a[0]-a[3], a[1]-a[3])
            + s(a[1]-a[3], a[2]-a[3])
            + s(a[2]-a[3], a[1]-a[3])
            - s(a[0]-a[1],a[1]-a[2]) < EPS))
      printf("IN\n");
    else
      printf("OUT\n");
  }
  rep(i,4)
    printf("%lf %lf ", a[i].real(), a[i].imag());
  printf("\n");
  
  return 0;
}