Go: package main

import (
	"bufio"
		"os"
	"strings"
	"strconv"
	"fmt"
	"math"
)

var scanner = bufio.NewScanner(os.Stdin)

type Point struct {
	x, y float64
}
func main() {
	for scanner.Scan() {
		buf1 := strings.Split(scanner.Text(), " ")
		line1 := make([]float64, len(buf1))
		for i := range line1 {
			line1[i], _ = strconv.ParseFloat(buf1[i], 64)
		}
		if line1[0] == 0 && line1[1] == 0 &&
			line1[2] == 0 && line1[3] == 0 {
				break
		}
		scanner.Scan()
		buf2 := strings.Split(scanner.Text(), " ")
		line2 := make([]float64, len(buf2))
		for i := range line2 {
			line2[i], _ = strconv.ParseFloat(buf2[i], 64)
		}
		scanner.Scan()
		buf3 := strings.Split(scanner.Text(), " ")
		line3 := make([]float64, len(buf3))
		for i := range line2 {
			line3[i], _ = strconv.ParseFloat(buf3[i], 64)
		}
		if !intersect(line1[0], line1[1], line1[2], line1[3], line2[0], line2[1], line2[2], line2[3]) ||
			!intersect(line2[0], line2[1], line2[2], line2[3], line3[0], line3[1], line3[2], line3[3]) ||
			!intersect(line3[0], line3[1], line3[2], line3[3], line1[0], line1[1], line1[2], line1[3]) {
				fmt.Println("kyo")
		} else {
			p1 := intersection(line1[0], line1[1], line1[2], line1[3], line2[0], line2[1], line2[2], line2[3])
			p2 := intersection(line2[0], line2[1], line2[2], line2[3], line3[0], line3[1], line3[2], line3[3])
			p3 := intersection(line3[0], line3[1], line3[2], line3[3], line1[0], line1[1], line1[2], line1[3])
			area := math.Abs((p2.x - p1.x) * (p3.y - p1.y) - (p2.y - p1.y) * (p3.x - p1.x))/2
			if area < 0.00000001 {
				fmt.Println("kyo")
			} else if 1899999.99999999 < area {
				fmt.Println("dai-kichi")
			} else if 999999.99999999 < area {
				fmt.Println("chu-kichi")
			} else if 99999.99999999 < area {
				fmt.Println("kichi")
			} else {
				fmt.Println("syo-kichi")
			}
		}
	}
}

func cross(x1, y1, x2, y2 float64) int {
	z :=  x1 * y2 - y1 * x2
	if 0 < z {
		return 1
	} else if z < 0 {
		return -1
	} else {
		return 0
	}
}

func intersect(x1, y1, x2, y2, x3, y3, x4, y4 float64) bool {
	if 0 <= cross(x2-x1, y2-y1, x3-x1, y3-y1) *
		cross(x2-x1, y2-y1, x4-x1, y4-y1) {
			return false
	}
	if 0 <= cross(x4-x3, y4-y3, x1-x3, y1-y3) *
		cross(x4-x3, y4-y3, x2-x3, y2-y3) {
			return false
	}
	return true
}

func intersection(x1, y1, x2, y2, x3, y3, x4, y4 float64) Point {
	if x3 == x4 {
		x1, x3 = x3, x1
		y1, y3 = y3, y1
		x2, x4 = x4, x2
		y2, y4 = y4, y2
	}
	ret := Point{}
	if x1 == x2 {
		// y軸に平行な直線の場合
		c := (y4 - y3) / (x4 - x3)
		d := y3 - c * x3
		x := x1
		y := c * x + d
		ret.x, ret.y = x, y
	} else {
		a := (y2 - y1) / (x2 - x1)
		b := y1 - a * x1
		c := (y4 - y3) / (x4 - x3)
		d := y3 - c * x3
		x := (d - b) / (a - c)
		y := a * x + b
		ret.x, ret.y = x, y
	}
	return ret
}

C++: #include <iostream>
#include <cmath>
using namespace std;

class Point {
public:
  double x;
  double y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  Point operator +(Point p) { return Point(x+p.x, y+p.y); }
  Point operator -(Point p) { return Point(x-p.x, y-p.y); }
  Point operator *(double a) { return Point(x*a, y*a); }
};
typedef Point Vector;

double dot(Vector a, Vector b) {
  return a.x*b.x + a.y*b.y;
}

double cross(Vector a, Vector b) {
  return a.x*b.y - a.y*b.x;
}

double norm(Vector v) {
  return v.x*v.x + v.y*v.y;
}

double abs(Vector v) {
  return sqrt(norm(v));
}

class Segment {
public:
  Point p1;
  Point p2;
  Segment(Point p1=Point(0,0), Point p2=Point(0,0)) : p1(p1), p2(p2) {}
};
typedef Segment Line;

Point project(Segment s, Point p) {
  Vector base = s.p2 - s.p1;
  double t = dot(p - s.p1, base)/norm(base);
  return s.p1 + base*t;
}

int ccw(Point p0, Point p1, Point p2) {
  Vector a = p1 - p0;
  Vector b = p2 - p0;
  if(cross(a, b) > 0) return 1;
  if(cross(a, b) < 0) return -1;
  if(dot(a, b) < 0) return 2;
  if(norm(a) < norm(b)) return -2;
  return 0;
}

bool isIntersect(Point p1, Point p2, Point p3, Point p4) {
  return (ccw(p1, p2, p3) * ccw(p1, p2, p4) <= 0 &&
	  ccw(p3, p4, p1) * ccw(p3, p4, p2) <= 0);
}

bool isIntersect(Segment s1, Segment s2) {
  return isIntersect(s1.p1, s1.p2, s2.p1, s2.p2);
}

Point getCrossPoint(Segment s1, Segment s2) {
  Vector base = s2.p2 - s2.p1;
  double d1 = abs(cross(base, s1.p1 - s2.p1));
  double d2 = abs(cross(base, s1.p2 - s2.p1));
  double t = d1/(d1+d2);
  return s1.p1 + (s1.p2-s1.p1)*t;
}

int main() {
  while(1) {
    Segment s[3];
    cin >> s[0].p1.x >> s[0].p1.y >> s[0].p2.x >> s[0].p2.y;
    if(s[0].p1.x == 0 && s[0].p1.y == 0 &&
       s[0].p2.x == 0 && s[0].p2.y == 0    ) break;
    for(int i = 1; i < 3; i++) {
      cin >> s[i].p1.x >> s[i].p1.y >> s[i].p2.x >> s[i].p2.y;
    }

    double S = -1;
    bool flag = true;
    for(int i = 0; i < 3; i++) {
      if(!isIntersect(s[i], s[(i+1)%3])) {
	flag = false;
	break;
      }
    }
    if(flag) {
    Point p[3];
    for(int i = 0; i < 3; i++) {
      p[i] = getCrossPoint(s[i], s[(i+1)%3]);
    }
    
    S = abs(p[1] - p[0]) * abs(project(Segment(p[0], p[1]), p[2]) - p[2]) / 2;
    }

    if(S >= 1900000) cout << "dai-kichi" << endl;
    else if(S >= 1000000) cout << "chu-kichi" << endl;
    else if(S >= 100000) cout << "kichi" << endl;
    else if(S > 0) cout << "syo-kichi" << endl;
    else cout << "kyo" << endl;
  }
  return 0;
}

C++: 
#include <iostream>
#include <vector>
#include <complex>
using namespace std;

#define EPS (1e-10)

typedef complex<double> P;

double cross(P a, P b) {
	return (a.real() * b.imag() - a.imag() * b.real());
}

int is_intersected_ls(P a1, P a2, P b1, P b2) {
	return
		( cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1) < EPS ) &&
		( cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1) < EPS );
}

P intersection_ls(P a1, P a2, P b1, P b2) {
	P b = b2-b1;
	double d1 = abs(cross(b, a1-b1));
	double d2 = abs(cross(b, a2-b1));
	double t = d1 / (d1 + d2);

	return a1 + (a2-a1) * t;
}

double area(vector<P> v){
	int n = v.size();
	double res = 0.0;

	for(int i=0;i<n;i++){
		res += cross(v[i],v[(i+1)%n]);
	}
	return fabs(res)/2;
}

int main(void){
	P s[3],g[3];

	while(1){
		for(int i=0;i<3;i++){
			cin>>s[i].real()>>s[i].imag()>>g[i].real()>>g[i].imag();
			if(s[i] == P(0,0) && g[i] == P(0,0)) return 0;
		}

		if(!is_intersected_ls(s[0],g[0],s[1],g[1]) ||
			 !is_intersected_ls(s[1],g[1],s[2],g[2]) ||
			 !is_intersected_ls(s[2],g[2],s[0],g[0]))
			cout<<"kyo\n";
		else{
			vector<P> v;
			v.push_back(intersection_ls(s[0],g[0],s[1],g[1]));
			v.push_back(intersection_ls(s[1],g[1],s[2],g[2]));
			v.push_back(intersection_ls(s[2],g[2],s[0],g[0]));

			double a = area(v);
			if(a >= 1900000) cout<<"dai-kichi\n";
			else if(a >= 1000000) cout<<"chu-kichi\n";
			else if(a >= 100000) cout<<"kichi\n";
			else if(a > 0) cout<<"syo-kichi\n";
			else cout<<"kyo\n";
		}
	}

	return 0;
}

C++: #include <iostream>
#include <math.h>
using namespace std;

double cross(double x1,double y1,double x2,double y2,double x3,double y3,double x4,double y4) {
	double m;
	m=(x4-x3)*(y2-y1)-(x2-x1)*(y4-y3);
	if (m==0) return -1;
	return ((x1-x3)*(y4-y3)-(x4-x3)*(y1-y3))/m;
 }

int main() {
  double a,s,sx[3],sy[3],ex[3],ey[3],cx[3],cy[3],hx,lx,hy,ly;
  int i,k;
  while(true) {
	lx=ly=9999999; hx=hy=-lx;  
   for (i=0;i<3;i++) {
	      cin >> sx[i] >> sy[i] >> ex[i] >> ey[i];
	      if (sx[i]==0 &&  sy[i]==0 && ex[i]==0 && ey[i]==0) return 0; 
	      }
	   for (i=0;i<3;i++) {
		k=(i+1) % 3;
		s=cross(sx[i],sy[i],ex[i],ey[i],sx[k],sy[k],ex[k],ey[k]);
		if (s<0 || s>1) break;
		cx[i]=sx[i]+s*(ex[i]-sx[i]); cy[i]=sy[i]+s*(ey[i]-sy[i]);
		hx=hx<cx[i] ? cx[i]:hx; lx=lx>cx[i] ? cx[i]:lx;
		hy=hy<cy[i] ? cy[i]:hy; ly=ly>cy[i] ? cy[i]:ly;
	}
	if (i!=3) { cout << "kyo" << endl; continue;}
	for (s=0,i=0;i<3;i++) s+=fabs(cx[i]-cx[(i+1) % 3])*fabs(cy[i]-cy[(i+1) % 3]);
	a=(hx-lx)*(hy-ly)-s/2;
	if (a>=1900000) cout << "dai-kichi"; else if (a>=1000000) cout << "chu-kichi";
	else if (a>=100000) cout << "kichi"; else if (a>0) cout << "syo-kichi";
	else cout << "kyo";
	cout << endl; 
 } 
  return 0;
}