#include <stdlib.h>

#include "tree.h"
#include "readpts.h"
#include "minint.h"
#include "test.h"

#define max(a,b) ((a>b)?a:b)

int main(int argc,
	 char *argv[]
	 )
{
  coord *points=NULL;
  int n=0;
  double a;
  double b;
  double min1;
  double min2;
  double min3;
  double min4;

  if(argc <= 1){
    fprintf(stderr,"There was no specified input!\n");
    return 1;
  }

  points=readpoints(argv[1],&a,&b,&n,points);
  if(points==NULL){
    fprintf(stderr,"Failed to read file %s",argv[1]);
    exit(1);
  }

  inter_tor(points,n,a,b,&min1,&min2,&min3,&min4);
  printf("%g ",n*(n-1)*acos(-1)*min1*min1);
  printf("%g ",n*(n-1)*acos(-1)*min2*min2);
  printf("%g ",n*(n-1)*acos(-1)*min3*min3);
  printf("%g\n",n*(n-1)*acos(-1)*min4*min4);

  return 0.0;
}
