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<stdio.h>
#include<math.h>
#include<algorithm>
using namespace std;
bool intersect(int ax,int ay,int bx,int by,int cx,int cy,int dx,int dy){
	long long ta=(cx-dx)*(ay-cy)+(cy-dy)*(cx-ax);
	long long tb=(cx-dx)*(by-cy)+(cy-dy)*(cx-bx);
	long long tc=(ax-bx)*(cy-ay)+(ay-by)*(ax-cx);
	long long td=(ax-bx)*(dy-ay)+(ay-by)*(ax-dx);
	if(ta*tb<=0LL&&tc*td<=0LL)return true;
	else return false;
}
pair<double,double>getpoint(int ax,int ay,int bx,int by,int cx,int cy ,int dx,int dy){
	double acx=cx-ax;
	double acy=cy-ay;
	double bunbo=(bx-ax)*(dy-cy)-(by-ay)*(dx-cx);
	double r=(acx*(dy-cy)-acy*(dx-cx))/bunbo;
	return make_pair(ax+(bx-ax)*r,ay+(by-ay)*r);
}
double ABS(double a){return a<0.0?-a:a;}
int main(){
	int x1,x2,x3,x4,x5,x6;
	int y1,y2,y3,y4,y5,y6;
	while(scanf("%d%d%d%d",&x1,&y1,&x2,&y2),x1||x2||y1||y2){
		scanf("%d%d%d%d%d%d%d%d",&x3,&y3,&x4,&y4,&x5,&y5,&x6,&y6);
		if(!intersect(x1,y1,x2,y2,x3,y3,x4,y4))printf("kyo\n");
		else if(!intersect(x1,y1,x2,y2,x5,y5,x6,y6))printf("kyo\n");
		else if(!intersect(x5,y5,x6,y6,x3,y3,x4,y4))printf("kyo\n");
		else{
			pair<double,double> p,q,r;
			p=getpoint(x1,y1,x2,y2,x3,y3,x4,y4);
			q=getpoint(x1,y1,x2,y2,x5,y5,x6,y6);
			r=getpoint(x5,y5,x6,y6,x3,y3,x4,y4);
			q=make_pair(q.first-p.first,q.second-p.second);
			r=make_pair(r.first-p.first,r.second-p.second);
			double S=ABS(q.first*r.second-q.second*r.first)/2;
			if(S<0.00001)printf("kyo\n");
			else if(S<100000.0-0.00001)printf("syo-kichi\n");
			else if(S<1000000.0-0.00001)printf("kichi\n");
			else if(S<1900000.0-0.00001)printf("chu-kichi\n");
			else printf("dai-kichi\n");
		}
	}
}

C++: #include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>

using namespace std;

int main()
{
    Point p[3], q[3], x[3];
    double S;
	
    while (1){
        for (int i = 0; i < 3; i++){
			int x1, y1, x2, y2;
            scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
			
            if (i == 0 && x1 == 0 && x2 == 0 && y1 == 0 && y2 == 0) return (0);
			
			p[i] = Point(x1, y1); q[i] = Point(x2, y2);
        }
		
		int k = 0;
		for (int i = 0; i < 3; i++){
			for (int j = i + 1; j < 3; j++){
				if (!isIntersect(p[i], q[i], p[j], q[j])){
					printf("kyo\n");
					goto next;
				}
				x[k++] = interPointS(p[i], q[i], p[j], q[j]);
			}
		}
		
		if (x[0] == x[1] || x[1] == x[2] || x[0] == x[2]){
			printf("kyo\n");
			goto next;
		}
		
		S = area(x[0], x[1], x[2]);
		
		if (S >= 1900000) printf("dai-kichi\n");
		else if (S >= 1000000) printf("chu-kichi\n");
		else if (S >= 100000) printf("kichi\n");
		else printf("syo-kichi\n");
		
		next:;
	}	
	
	return (0);
}

C++: #include <vector>
#include <iostream>
#include <set>
#include <cstdio>
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <tuple>
#include <algorithm>
#include <limits>
#include <map>
#include <complex>
using namespace std;
typedef long long ll;

const double EPS = 1e-9;

typedef complex<double> P;
struct L {
    P x, y;
    L() {};
    L(P a, P b) {x=a, y=b;};
};

namespace std {
    bool operator < (P a, P b) {
        return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
    }
}

double cross(P a, P b) { return imag(conj(a)*b); }
double dot(P a, P b) { return real(conj(a)*b); }

int ccw(P a, P b, P c) {
    b -= a; c -= a;
    if (cross(b, c) > 0) return 1;
    if (cross(b, c) < 0) return -1;
    if (dot(b, c) < 0) return 2;
    if (norm(b) < norm(c)) return -2;
    return 0;
}

bool insLL(L &l, L &m) {
    if (abs(cross(l.y-l.x, m.y-m.x)) > EPS) return true;
    if (abs(cross(l.y-l.x, m.y-l.x)) < EPS) return true;
    return false;
}

bool insLS(L &l, L &s) {
    double a = cross(l.y-l.x, s.x-l.x);
    double b = cross(l.y-l.x, s.y-l.x);
    if (a*b < EPS) return true;
    return false;
}

bool insSP(L &s, P &p) {
    return abs(s.x-p)+abs(s.y-p)+abs(s.y-s.x) < EPS;
}

bool insSS(L &s, L &t) {
    int a = ccw(s.x,s.y,t.x), b = ccw(s.x,s.y,t.y);
    int c = ccw(t.x,t.y,s.x), d = ccw(t.x,t.y,s.y);
    if (a*b <= 0 && c*d <= 0) return true;
    return false;
}

P crossp(L &l, L &m) {
    double A = cross(l.y-l.x, m.y-m.x);
    double B = cross(l.y-l.x, l.y-m.x);
    if (abs(A) < EPS && abs(B) < EPS) return m.x;
    return m.x+B/A*(m.y-m.x);
}

int main() {
    while (true) {
        L l1, l2, l3;
        int x1, y1, x2, y2;
        cin >> x1 >> y1 >> x2 >> y2;
        if (!x1 && !y1 && !x2 && !y2) break;
        l1.x = P(x1, y1); l1.y = P(x2, y2);
        cin >> x1 >> y1 >> x2 >> y2;
        l2.x = P(x1, y1); l2.y = P(x2, y2);
        cin >> x1 >> y1 >> x2 >> y2;
        l3.x = P(x1, y1); l3.y = P(x2, y2);
        P p1 = crossp(l1, l2);
        P p2 = crossp(l2, l3);
        P p3 = crossp(l3, l2);
        double s = abs(cross(p2-p1, p3-p1))/2;
        if (1900000 <= s) cout << "dai-kichi" << endl;
        else if (1000000 <= s) cout << "chu-kichi" << endl;
        else if (100000 <= s) cout << "kichi" << endl;
        else if (EPS <= s) cout << "syo-kichi" << endl;
        else cout << "kyo" << endl;
    }
}