https://www.acmicpc.net/problem/16431
import java.util.*;
fun main(args: Array<String>) {
val s=Scanner(System.`in`)
var br=s.nextInt(); var bc=s.nextInt()
var dr=s.nextInt(); var dc=s.nextInt()
var lr=s.nextInt(); var lc=s.nextInt()
var m=Math.min(Math.abs(lr-br),Math.abs(lc-bc))
var sum=Math.abs(lr-br)+Math.abs(lc-bc)-m
var sum1=Math.abs(lr-dr)+Math.abs(lc-dc)
if(sum>sum1) print("daisy")
else if(sum<sum1) print("bessie")
else print("tie")
}