Polycarpus is a system administrator. There are two servers under his strict guidance — a and b. To stay informed about the servers' performance, Polycarpus executes commands "ping a" and "ping b". Each ping command sends exactly ten packets to the server specified in the argument of the command. Executing a program results in two integers x and y (x + y = 10; x, y ≥ 0). These numbers mean that x packets successfully reached the corresponding server through the network and y packets were lost.

Today Polycarpus has performed overall n ping commands during his workday. Now for each server Polycarpus wants to know whether the server is "alive" or not. Polycarpus thinks that the server is "alive", if at least half of the packets that we send to this server reached it successfully along the network.

Help Polycarpus, determine for each server, whether it is "alive" or not by the given commands and their results.


-----Input-----

The first line contains a single integer n (2 ≤ n ≤ 1000) — the number of commands Polycarpus has fulfilled. Each of the following n lines contains three integers — the description of the commands. The i-th of these lines contains three space-separated integers t_{i}, x_{i}, y_{i} (1 ≤ t_{i} ≤ 2; x_{i}, y_{i} ≥ 0; x_{i} + y_{i} = 10). If t_{i} = 1, then the i-th command is "ping a", otherwise the i-th command is "ping b". Numbers x_{i}, y_{i} represent the result of executing this command, that is, x_{i} packets reached the corresponding server successfully and y_{i} packets were lost.

It is guaranteed that the input has at least one "ping a" command and at least one "ping b" command.


-----Output-----

In the first line print string "LIVE" (without the quotes) if server a is "alive", otherwise print "DEAD" (without the quotes).

In the second line print the state of server b in the similar format.


-----Examples-----
Input
2
1 5 5
2 6 4

Output
LIVE
LIVE

Input
3
1 0 10
2 0 10
1 10 0

Output
LIVE
DEAD



-----Note-----

Consider the first test case. There 10 packets were sent to server a, 5 of them reached it. Therefore, at least half of all packets sent to this server successfully reached it through the network. Overall there were 10 packets sent to server b, 6 of them reached it. Therefore, at least half of all packets sent to this server successfully reached it through the network.

Consider the second test case. There were overall 20 packages sent to server a, 10 of them reached it. Therefore, at least half of all packets sent to this server successfully reached it through the network. Overall 10 packets were sent to server b, 0 of them reached it. Therefore, less than half of all packets sent to this server successfully reached it through the network.

Source: codeforces | Difficulty: EASY
Tags: Implementation


Solutions:
n = int(input())
Ans = ''
A = [0, 0]
B = [0, 0]
for i in range(n):
	(l, x, y) = map(int, input().split())
	if l == 1:
		A[0] += x
		A[1] += 10
	else:
		B[0] += x
		B[1] += 10
if A[0] / A[1] >= 1 / 2:
	print('LIVE')
else:
	print('DEAD')
if B[0] / B[1] >= 1 / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
a = 0
b = 0
for A in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		a += x
		a -= y
	else:
		b += x
		b -= y
if a >= 0:
	print('LIVE')
else:
	print('DEAD')
if b >= 0:
	print('LIVE')
else:
	print('DEAD')


IL = lambda : list(map(int, input().split()))
n = int(input())
A = [[0, 0], [0, 0]]
for i in range(n):
	(t, x, y) = IL()
	A[t - 1][0] += x
	A[t - 1][1] += 10
print(['DEAD', 'LIVE'][A[0][0] * 2 >= A[0][1]])
print(['DEAD', 'LIVE'][A[1][0] * 2 >= A[1][1]])


n = int(input())
k = [0] * 3
for _ in range(n):
	(t, x, y) = map(int, input().split())
	k[t] += x - y
for i in range(1, 3):
	print('LIVE' if k[i] >= 0 else 'DEAD')


n = int(input())
(a_r, a_l) = (0, 0)
(b_r, b_l) = (0, 0)
for i in range(n):
	p = [int(i) for i in input().split()]
	if p[0] == 1:
		a_l += p[2]
		a_r += p[1]
	else:
		b_l += p[2]
		b_r += p[1]
if a_r >= a_l:
	print('LIVE')
else:
	print('DEAD')
if b_r >= b_l:
	print('LIVE')
else:
	print('DEAD')


n = int(input(''))
s1 = 0
s2 = 0
count1 = 0
count2 = 0
for y in range(n):
	t = str(input('')).split()
	if t[0] == '1':
		s1 += int(t[1]) - int(t[2])
		count1 += 1
	else:
		s2 += int(t[1]) - int(t[2])
		count2 += 1
if count1 > 0:
	if s1 >= 0:
		print('LIVE')
	else:
		print('DEAD')
if count2 > 0:
	if s2 >= 0:
		print('LIVE')
	else:
		print('DEAD')


n = int(input())
a = []
for i in range(n):
	a.append([int(x) for x in input().split()])
(x, y, x1, y1) = (0, 0, 0, 0)
for i in a:
	if i[0] == 1:
		x += i[1]
		y += i[2]
	else:
		x1 += i[1]
		y1 += i[2]
if x >= y:
	print('LIVE')
else:
	print('DEAD')
if x1 >= y1:
	print('LIVE')
else:
	print('DEAD')


a = int(input())
x1 = 0
x2 = 0
s1 = 0
s2 = 0
for i in range(a):
	(s, ai, b1) = map(int, input().split())
	if s == 1:
		s1 += 1
		x1 += ai
	else:
		s2 += 1
		x2 += ai
if x1 >= s1 * 5:
	print('LIVE')
else:
	print('DEAD')
if x2 >= s2 * 5:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(a, ar, b, br) = (0, 0, 0, 0)
for i in range(n):
	x = list(map(int, input().split()))
	if x[0] == 1:
		a += 10
		ar += x[1]
	else:
		b += 10
		br += x[1]
print('DLEIAVDE'[ar >= a // 2::2])
print('DLEIAVDE'[br >= b // 2::2])


hsl = [0] * 2
for i in range(int(input())):
	a = [int(i) for i in input().split()]
	(k, x, y) = (a[0], a[1], a[2])
	hsl[k - 1] += x - y
for i in range(2):
	if hsl[i] >= 0:
		print('LIVE')
	else:
		print('DEAD')


n = int(input())
lst = []
a1 = 0
a2 = 0
b1 = 0
b2 = 0
for i in range(n):
	lst.append([int(x) for x in input().split()])
	if lst[-1][0] == 1:
		a1 += lst[-1][1]
		a2 += lst[-1][2]
	else:
		b1 += lst[-1][1]
		b2 += lst[-1][2]
if a1 / (a1 + a2) >= 0.5:
	print('LIVE')
else:
	print('DEAD')
if b1 / (b1 + b2) >= 0.5:
	print('LIVE')
else:
	print('DEAD')


cases = int(input())
ax = 0
ay = 0
bx = 0
by = 0
while cases:
	cases -= 1
	(t, x, y) = map(int, input().split())
	if t == 1:
		ax += x
		ay += y
	else:
		bx += x
		by += y
if ax // ay >= 1:
	print('LIVE')
else:
	print('DEAD')
if bx // by >= 1:
	print('LIVE')
else:
	print('DEAD')


(as1, bs1, as2, bs2) = (0, 0, 0, 0)
number = int(input())
for m in range(number):
	(a, b, c) = map(int, input().split())
	if a == 1:
		as1 += b
		as2 += c
	elif a == 2:
		bs1 += b
		bs2 += c
if as1 >= as2:
	print('LIVE')
else:
	print('DEAD')
if bs1 >= bs2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
l1 = 0
l = 0
k = 0
k1 = 0
c1 = 0
c2 = 0
for i in range(n):
	(p, g, o) = list(map(int, input().split(' ')))
	if p == 1:
		c1 = c1 + 1
		l = l + g
		l1 = l1 + o
	else:
		c2 = c2 + 1
		k = k + g
		k1 = k1 + o
if l >= c1 * 10 // 2:
	print('LIVE')
else:
	print('DEAD')
if k >= c2 * 10 // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
servera = 0
serverb = 0
inputa = 0
inputb = 0
for i in range(n):
	x = [int(tmp) for tmp in input().split()]
	if x[0] == 1:
		servera += 10
		inputa += x[1]
	elif x[0] == 2:
		serverb += 10
		inputb += x[1]
if inputa >= servera // 2:
	print('LIVE')
else:
	print('DEAD')
if inputb >= serverb // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(count1, count2, count3, count4) = (0, 0, 0, 0)
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		count1 = count1 + x
		count2 = count2 + y
	else:
		count3 = count3 + x
		count4 = count4 + y
if count1 >= count2:
	print('LIVE')
else:
	print('DEAD')
if count3 >= count4:
	print('LIVE')
else:
	print('DEAD')


suc = []
los = []
k1 = 0
k3 = 0
a = 0
b = 0
n = int(input())
for x in range(n):
	(t, s, l) = map(int, input().strip().split()[:3])
	if t == 1:
		suc.append([s, l])
		a += 1
	else:
		los.append([s, l])
		b += 1
for x in suc:
	k1 += x[0]
for y in los:
	k3 += y[0]
if k1 >= a * 5:
	print('LIVE')
else:
	print('DEAD')
if k3 >= b * 5:
	print('LIVE')
else:
	print('DEAD')


t = int(input())
d = {}
for i in range(t):
	(s, x, y) = map(int, input().split())
	if s in d:
		d[s][0] += x
		d[s][1] += y
	else:
		d[s] = [x, y]
if d[1][0] >= d[1][1]:
	print('LIVE')
else:
	print('DEAD')
if d[2][0] >= d[2][1]:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
sa = sb = fa = fb = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		sa += x
		fa += y
	else:
		sb += x
		fb += y
if sa >= fa:
	print('LIVE')
else:
	print('DEAD')
if sb >= fb:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(ans11, ans12, ans21, ans22) = (0, 0, 0, 0)
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		ans11 += x
		ans12 += 10
	else:
		ans21 += x
		ans22 += 10
if ans11 >= ans12 // 2:
	print('LIVE')
else:
	print('DEAD')
if ans21 >= ans22 // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
ax = 0
ay = 0
bx = 0
by = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		ax += x
		ay += y
	else:
		bx += x
		by += y
if ax >= ay:
	print('LIVE')
else:
	print('DEAD')
if bx >= by:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
a = [0, 0]
b = [0, 0]
for i in range(n):
	inp = list(map(int, input().split()))
	if inp[0] == 1:
		a[0] += inp[1]
		a[1] += inp[2]
	else:
		b[0] += inp[1]
		b[1] += inp[2]
if a[0] >= a[1]:
	print('LIVE')
else:
	print('DEAD')
if b[0] >= b[1]:
	print('LIVE')
else:
	print('DEAD')


def main():
	n = int(input())
	a = []
	for i in range(n):
		a.append(list(map(int, input().split())))
	a1 = [i[1] for i in a if i[0] == 1]
	a2 = [j[1] for j in a if j[0] == 2]
	if sum(a1) >= len(a1) * 5:
		print('LIVE')
	else:
		print('DEAD')
	if sum(a2) >= len(a2) * 5:
		print('LIVE')
	else:
		print('DEAD')
main()


a1 = []
a2 = []
d = 0
e = 0
c = 0
g = 0
h = 0
r = 0
a = int(input(''))
for i in range(0, a, 1):
	b = input('')
	a1 = b.split(' ')
	for j in range(0, 3, 1):
		a2.append(int(a1[j]))
for i in range(0, 3 * a, 3):
	if a2[i] == 1:
		d += a2[i + 1]
		e += a2[i + 2]
		continue
	elif a2[i] != 1:
		c += a2[i + 1]
		g += a2[i + 2]
		continue
if d >= e:
	print('LIVE')
elif d < e:
	print('DEAD')
if c >= g:
	print('LIVE')
elif c < g:
	print('DEAD')


a = [0, 0]
for _ in [0] * int(input()):
	(t, x, y) = map(int, input().split())
	a[t - 1] += x - y
for x in a:
	print(['LIVE', 'DEAD'][x < 0])


ok = [0, 0]
lost = [0, 0]
n = int(input())
for _ in range(n):
	(t, x, y) = map(int, input().split())
	ok[t - 1] += x
	lost[t - 1] += y
outs = ('DEAD', 'LIVE')
print(outs[ok[0] >= lost[0]])
print(outs[ok[1] >= lost[1]])


n = int(input())
a = b = 0
a_success = b_success = 0
for i in range(0, n):
	description = [int(x) for x in input().split()]
	if description[0] == 1:
		a += 1
		a_success += description[1]
	else:
		b += 1
		b_success += description[1]
print(['DEAD', 'LIVE'][a_success >= a * 5])
print(['DEAD', 'LIVE'][b_success >= b * 5])


(hasil1, hasil2) = (0, 0)
(total1, total2) = (0, 0)
for i in range(int(input())):
	(a, b, c) = [int(x) for x in input().split()]
	if a == 1:
		hasil1 += 10
		total1 += b
	else:
		hasil2 += 10
		total2 += b
if total1 >= hasil1 // 2:
	print('LIVE')
else:
	print('DEAD')
if total2 >= hasil2 // 2:
	print('LIVE')
else:
	print('DEAD')


a = 0
b = 0
success_a = 0
success_b = 0
for _ in range(int(input())):
	(x, t1, t2) = map(int, input().split())
	if x == 1:
		success_a += t1
		a += 10
	else:
		success_b += t1
		b += 10
if success_a >= a // 2:
	print('LIVE')
else:
	print('DEAD')
if success_b >= b // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(a, b, c, d) = (0, 0, 0, 0)
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		a += x
		b += y
	else:
		c += x
		d += y
if a >= b:
	print('LIVE')
else:
	print('DEAD')
if c >= d:
	print('LIVE')
else:
	print('DEAD')


from functools import reduce
from operator import *
from math import *
from sys import *
from string import *
from collections import *
setrecursionlimit(10 ** 7)
dX = [-1, 1, 0, 0, -1, 1, -1, 1]
dY = [0, 0, -1, 1, 1, -1, -1, 1]
RI = lambda : list(map(int, input().split()))
RS = lambda : input().rstrip().split()
n = RI()[0]
ti = [0] * 3
tot = [0] * 3
for i in range(n):
	(t, x, y) = RI()
	tot[t] += x
	ti[t] += 1
for i in (1, 2):
	print(['LIVE', 'DEAD'][ti[i] * 5 > tot[i]])


i = input
n = int(i())
Tmp = {'a': ['DEAD', 0, 0], 'b': ['DEAD', 0, 0]}
for j in range(n):
	l = [*map(int, i().split())]
	if l[0] == 1:
		Tmp['a'][1] += 1
		Tmp['a'][2] += l[1]
	else:
		Tmp['b'][1] += 1
		Tmp['b'][2] += l[1]
print('LIVE') if Tmp['a'][2] >= Tmp['a'][1] * 10 // 2 else print('DEAD')
print('LIVE') if Tmp['b'][2] >= Tmp['b'][1] * 10 // 2 else print('DEAD')


n = int(input())
n_a = n_b = 0
x_a = x_b = 0
for i in range(n):
	(t, x, y) = input().split()
	if t == '1':
		x_a += int(x)
		n_a += 10
	else:
		x_b += int(x)
		n_b += 10
print('LIVE' if x_a >= n_a / 2 else 'DEAD')
print('LIVE' if x_b >= n_b / 2 else 'DEAD')


n = int(input())
ax = ay = bx = by = 0
for _ in range(n):
	(d, x, y) = map(int, input().split())
	if d == 1:
		ax += x
		ay += y
	else:
		bx += x
		by += y
if ax < ay:
	print('DEAD')
else:
	print('LIVE')
if bx < by:
	print('DEAD')
else:
	print('LIVE')


while 1:
	try:
		n = int(input())
		(a, b, c) = ([0 for j in range(n)], [0 for j in range(n)], [0 for j in range(n)])
		(sum1, sum2) = (0, 0)
		for i in range(0, n):
			(a[i], b[i], c[i]) = map(int, input().split())
			if a[i] == 1:
				sum1 += b[i]
			else:
				sum2 += b[i]
		(count1, count2) = (a.count(1), a.count(2))
		(t1, t2) = (10 * count1, 10 * count2)
		if sum1 / t1 >= 0.5:
			print('LIVE')
		else:
			print('DEAD')
		if sum2 / t2 >= 0.5:
			print('LIVE')
		else:
			print('DEAD')
	except EOFError:
		break


(tot_a, tot_b, suc_a, suc_b, fail_a, fail_b) = (0, 0, 0, 0, 0, 0)
for t in range(int(input())):
	(t, x, y) = map(int, input().split())
	if t == 1:
		tot_a += x + y
		suc_a += x
		fail_a += y
	elif t == 2:
		tot_b += x + y
		suc_b += x
		fail_b += y
if suc_a >= tot_a // 2:
	print('LIVE')
else:
	print('DEAD')
if suc_b >= tot_b // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
aSent = 0
bSent = 0
aReceived = 0
bReceived = 0
for i in range(n):
	string = input().split(' ')
	if string[0] == '1':
		aSent += 10
		aReceived += int(string[1])
	elif string[0] == '2':
		bSent += 10
		bReceived += int(string[1])
if aReceived / aSent >= 0.5:
	print('LIVE')
else:
	print('DEAD')
if bReceived / bSent >= 0.5:
	print('LIVE')
else:
	print('DEAD')


import math
t = int(input())
sum1 = 0
sum2 = 0
s1 = 0
s2 = 0
for i in range(t):
	(s, x, y) = input().split()
	if int(s) == 1:
		sum1 += int(x)
		s1 += 1
	else:
		sum2 += int(x)
		s2 += 1
if sum1 >= s1 * 5:
	print('LIVE')
else:
	print('DEAD')
if sum2 >= s2 * 5:
	print('LIVE')
else:
	print('DEAD')


s = [[0, 0], [0, 0]]
for _ in range(int(input())):
	(t, x, y) = map(int, input().split())
	s[t - 1][0] += x
	s[t - 1][1] += y
for i in range(2):
	print(('DEAD', 'LIVE')[s[i][0] >= s[i][1]])


c = [[0, 0], [0, 0]]
for i in range(int(input())):
	l = [int(x) for x in input().split()]
	c[l[0] - 1][0] += l[1]
	c[l[0] - 1][1] += l[2]
for i in range(2):
	print('LIVE' if c[i][0] >= c[i][1] else 'DEAD')


a = list()
b = list()
for _ in range(int(input())):
	(t, x, y) = map(int, input().split())
	if t == 1:
		a.append(x)
	else:
		b.append(x)
sm = sum(a)
smh = len(a) * 10 // 2
if sm >= smh:
	print('LIVE')
else:
	print('DEAD')
sm1 = sum(b)
smh1 = len(b) * 10 // 2
if sm1 >= smh1:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(ta, tb, da, db) = [0] * 4
for i in range(n):
	(t, x, y) = list(map(int, input().split()))
	if t == 1:
		ta += x + y
		da += y
	if t == 2:
		tb += x + y
		db += y
if ta - da >= 0.5 * ta:
	print('LIVE')
else:
	print('DEAD')
if tb - db >= 0.5 * tb:
	print('LIVE')
else:
	print('DEAD')


l = []
m = []
n = []
p = []
a = int(input())
for i in range(a):
	(t, x, y) = map(int, input().split())
	if t == 1:
		l.append(x)
		m.append(y)
	else:
		n.append(x)
		p.append(y)
if sum(l) >= sum(m):
	print('LIVE')
else:
	print('DEAD')
if sum(n) >= sum(p):
	print('LIVE')
else:
	print('DEAD')


n = int(input())
pinga = pingb = sum1 = sum2 = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		pinga += 1
		sum1 += x
	elif t == 2:
		pingb += 1
		sum2 += x
if sum1 >= pinga * 10 // 2:
	print('LIVE')
else:
	print('DEAD')
if sum2 >= pingb * 10 // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
la = [0, 0]
lb = [0, 0]
for _ in range(n):
	l = list(map(int, input().split()))
	if l[0] == 1:
		la[0] += l[1]
		la[1] += l[2]
	else:
		lb[0] += l[1]
		lb[1] += l[2]
if la[0] >= la[1]:
	print('LIVE')
else:
	print('DEAD')
if lb[0] >= lb[1]:
	print('LIVE')
else:
	print('DEAD')


t = int(input())
pa = 0
pb = 0
for i in range(t):
	(a, b, c) = list(map(int, input().split()))
	if a == 1:
		pa += b - 5
	else:
		pb += b - 5
if pa >= 0:
	print('LIVE')
else:
	print('DEAD')
if pb >= 0:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
am = 0
amt = 0
bm = 0
bmt = 0
for i in range(n):
	(s, x, y) = input().split()
	(s, x, y) = (int(s), int(x), int(y))
	if s == 1:
		am += x
		amt += 10
	else:
		bm += x
		bmt += 10
if am * 2 >= amt:
	print('LIVE')
else:
	print('DEAD')
if bm * 2 >= bmt:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
mat = [0] * 3
for _ in range(n):
	(i, x, y) = map(int, input().split())
	mat[i] += x - y
print('LIVE' if mat[1] >= 0 else 'DEAD')
print('LIVE' if mat[2] >= 0 else 'DEAD')


def printing(pack, count):
	if pack >= count * 10 // 2:
		return 'LIVE'
	else:
		return 'DEAD'
packA = 0
packB = 0
countA = 0
countB = 0
n = int(input())
for i in range(n):
	nums = [int(i) for i in input().split()]
	if nums[0] == 1:
		countA += 1
		packA += nums[1]
	else:
		countB += 1
		packB += nums[1]
print(printing(packA, countA))
print(printing(packB, countB))


a = int(input())
x = y = m = n = int(0)
for _ in range(a):
	(a, b, c) = map(int, input().split())
	if a == 1:
		x = x + b
		m = m + 10
	else:
		y = y + b
		n = n + 10
if x >= m / 2:
	print('LIVE')
else:
	print('DEAD')
if y >= n / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
La = []
Lb = []
(sum1, sum2) = (0, 0)
for i in range(n):
	L = [int(x) for x in input().split()]
	if L[0] == 1:
		La.append(L)
		sum1 = sum1 + 1
	else:
		Lb.append(L)
		sum2 = sum2 + 1
s1 = 0
s2 = 0
k1 = 0
k2 = 0
for i in La:
	s1 = s1 + i[1]
	k1 += i[1] + i[2]
for i in Lb:
	s2 = s2 + i[1]
	k2 += i[1] + i[2]
if k1 <= s1 * 2:
	print('LIVE')
else:
	print('DEAD')
if k2 <= s2 * 2:
	print('LIVE')
else:
	print('DEAD')


a = b = 0
n = int(input())
for i in range(n):
	(code, x, y) = map(int, input().split())
	if code == 1:
		a += x - y
	else:
		b += x - y
if a >= 0:
	print('LIVE')
else:
	print('DEAD')
if b >= 0:
	print('LIVE')
else:
	print('DEAD')


def Server():
	n = int(input())
	aReached = 0
	aLost = 0
	bReached = 0
	bLost = 0
	for i in range(n):
		(num, r, l) = list(map(int, input().split()))
		if num == 1:
			aReached += r
			aLost += l
		else:
			bReached += r
			bLost += l
	if aReached >= aLost:
		print('LIVE')
	else:
		print('DEAD')
	if bReached >= bLost:
		print('LIVE')
	else:
		print('DEAD')
Server()


n = int(input())
p = [tuple(map(int, input().split())) for _ in range(n)]
(rec1, rec2) = (0, 0)
(fai1, fai2) = (0, 0)
for t in p:
	if t[0] == 1:
		rec1 += t[1]
		fai1 += t[2]
	else:
		rec2 += t[1]
		fai2 += t[2]
if rec1 >= fai1:
	print('LIVE')
else:
	print('DEAD')
if rec2 >= fai2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
ping_a = 0
ping_b = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		ping_a += x
		ping_a -= y
	elif t == 2:
		ping_b += x
		ping_b -= y
if ping_a >= 0:
	print('LIVE')
else:
	print('DEAD')
if ping_b >= 0:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
cnt1 = cnt2 = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		cnt1 = cnt1 + x - y
	else:
		cnt2 = cnt2 + x - y
if cnt1 < 0:
	print('DEAD')
else:
	print('LIVE')
if cnt2 < 0:
	print('DEAD')
else:
	print('LIVE')


n = int(input())
(a1, a2, b1, b2) = (0, 0, 0, 0)
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		a1 += 1
		a2 += x
	else:
		b1 += 1
		b2 += x
if a2 >= 5 * a1:
	print('LIVE')
else:
	print('DEAD')
if b2 >= 5 * b1:
	print('LIVE')
else:
	print('DEAD')


t = int(input())
(ar, al, br, bl) = (0, 0, 0, 0)
for _ in range(t):
	(i, x, y) = map(int, input().split())
	if i == 1:
		ar += x
		al += y
	else:
		br += x
		bl += y
if ar >= al:
	print('LIVE')
else:
	print('DEAD')
if br >= bl:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(q, w, e, r) = (0, 0, 0, 0)
for i in range(n):
	a = list(map(int, input().split()))
	if a[0] == 1:
		q = q + a[1]
		w += 1
	else:
		e = e + a[1]
		r += 1
if q / w >= 5:
	print('LIVE')
else:
	print('DEAD')
if e / r >= 5:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
inp = list()
xa = 0
xb = 0
yb = 0
ya = 0
for i in range(0, n):
	inp = [int(inp) for inp in input().split()]
	if inp[0] == 1:
		xa = xa + inp[1]
		ya = ya + inp[2]
	else:
		xb = xb + inp[1]
		yb = yb + inp[2]
	del inp[0:]
if xa >= ya:
	ans1 = 'LIVE'
else:
	ans1 = 'DEAD'
if xb >= yb:
	ans2 = 'LIVE'
else:
	ans2 = 'DEAD'
del xa, xb, ya, yb
print(ans1, '\n%s' % ans2)


a = b = 0
a1 = b1 = 0
for _ in range(int(input())):
	(t, x, y) = map(int, input().split())
	if t == 1:
		a += x
		a1 += y
	else:
		b += x
		b1 += y
print('LIVE' if a >= a1 else 'DEAD')
print('LIVE' if b >= b1 else 'DEAD')


def s(ar):
	(aLive, aDead, bLive, bDead) = (0, 0, 0, 0)
	for i in ar:
		if i[0] == 1:
			aLive += i[1]
			aDead += i[2]
		if i[0] == 2:
			bLive += i[1]
			bDead += i[2]
	if aLive >= aDead:
		print('LIVE')
	else:
		print('DEAD')
	if bLive >= bDead:
		print('LIVE')
	else:
		print('DEAD')
count = int(input())
a = []
for _ in range(0, count):
	a.append(list(map(int, input().split())))
s(a)


n = int(input())
add1 = 0
add2 = 0
add3 = 0
add4 = 0
for i in range(n):
	(x, y, z) = list(map(int, input().split()))
	if x == 1:
		add1 += y + z
		add2 += y
	elif x != 1:
		add3 += y + z
		add4 += y
if add2 >= add1 // 2:
	print('LIVE')
else:
	print('DEAD')
if add4 >= add3 // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(xa, ya, xb, yb) = (0, 0, 0, 0)
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		xa += x
		ya += y
	else:
		xb += x
		yb += y
if xa >= ya:
	print('LIVE')
else:
	print('DEAD')
if xb >= yb:
	print('LIVE')
else:
	print('DEAD')


def server_status(packets):
	first_delta = 0
	second_delta = 0
	for packet in packets:
		if packet[0] == 1:
			first_delta += packet[1] - packet[2]
		else:
			second_delta += packet[1] - packet[2]
	print('LIVE' if first_delta >= 0 else 'DEAD')
	print('LIVE' if second_delta >= 0 else 'DEAD')
packets = []
for i in range(int(input())):
	packet = list(map(int, input().split()))
	packets.append(packet)
server_status(packets)


n = int(input())
r = [[0, 0, 0], [0, 0, 0]]
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		r[0][0] += 1
		r[0][1] += x
		r[0][2] += y
	else:
		r[1][0] += 1
		r[1][1] += x
		r[1][2] += y
for i in r:
	if i[1] < i[2]:
		print('DEAD')
	else:
		print('LIVE')


n = int(input())
sum_a = 0
alive_a = 0
sum_b = 0
alive_b = 0
for i in range(n):
	(x, y, z) = map(int, input().split())
	if x == 1:
		sum_a += 10
		alive_a += y
	else:
		sum_b += 10
		alive_b += y
if alive_a >= sum_a / 2:
	print('LIVE')
else:
	print('DEAD')
if alive_b >= sum_b / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
server1 = [0, 0]
server2 = [0, 0]
for i in range(n):
	lst = [int(x) for x in input().split()]
	if lst[0] == 1:
		server1[0] += lst[1]
		server1[1] += 10
	if lst[0] == 2:
		server2[0] += lst[1]
		server2[1] += 10
if server1[0] / server1[1] >= 0.5:
	print('LIVE')
else:
	print('DEAD')
if server2[0] / server2[1] >= 0.5:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
total_a = 0
total_b = 0
for _ in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		total_a += x - y
	else:
		total_b += x - y
if total_a >= 0:
	print('LIVE')
else:
	print('DEAD')
if total_b >= 0:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
sum1x = 0
sum1y = 0
sum2x = 0
sum2y = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		sum1x += x
		sum1y += y
	if t == 2:
		sum2x += x
		sum2y += y
if sum1x >= sum1y:
	print('LIVE')
else:
	print('DEAD')
if sum2x >= sum2y:
	print('LIVE')
else:
	print('DEAD')


f = lambda : map(int, input().split())
n = int(input())
x1 = x2 = y1 = y2 = 0
while n:
	(a, x, y) = f()
	if a == 1:
		x1 += x
		y1 += y
	else:
		x2 += x
		y2 += y
	n -= 1
print('LDIEVAED'[x1 < y1::2])
print('LDIEVAED'[x2 < y2::2])


(ax, ay, bx, by) = (0, 0, 0, 0)
for _ in range(int(input())):
	(t, x, y) = map(int, input().split())
	if t == 1:
		ax += x
		ay += y
	else:
		bx += x
		by += y
if ax >= (ax + ay) // 2:
	print('LIVE')
else:
	print('DEAD')
if bx >= (bx + by) // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(a, b, c, d) = (0, 0, 0, 0)
for i in range(n):
	(a1, b1, c1) = map(int, input().split())
	if a1 == 1:
		a += b1
		c += c1
	if a1 == 2:
		b += b1
		d += c1
if a >= c:
	print('LIVE')
if a < c:
	print('DEAD')
if b >= d:
	print('LIVE')
if b < d:
	print('DEAD')


n = int(input())
d1 = 0
l1 = 0
l2 = 0
d2 = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		l1 += x
		d1 += y
	else:
		l2 += x
		d2 += y
if l1 >= d1:
	print('LIVE')
else:
	print('DEAD')
if l2 >= d2:
	print('LIVE')
else:
	print('DEAD')


count = int(input())
sendToA = 0
sendToB = 0
receivedA = 0
receivedB = 0
for i in range(count):
	line = list(map(int, input().split(' ')))
	if line[0] == 1:
		sendToA += line[1]
		receivedA += line[2]
	else:
		sendToB += line[1]
		receivedB += line[2]
if (sendToA + receivedA) / receivedA >= 2:
	print('LIVE')
else:
	print('DEAD')
if (sendToB + receivedB) / receivedB >= 2:
	print('LIVE')
else:
	print('DEAD')


(X, Y) = ([0, 0], [0, 0])
for _ in range(int(input())):
	(t, x, y) = map(int, input().split())
	(X[t - 1], Y[t - 1]) = (X[t - 1] + x, Y[t - 1] + y)
for i in range(2):
	print('DEAD' if X[i] < Y[i] else 'LIVE')


n = int(input())
b = 0
c = 0
d = 0
e = 0
for i in range(n):
	a = list(map(int, input().split()))
	if a[0] == 1:
		b += a[1]
		c += a[2]
	else:
		d += a[1]
		e += a[2]
if b >= c:
	print('LIVE')
else:
	print('DEAD')
if d >= e:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
p1 = 0
s1 = 0
p2 = 0
s2 = 0
for i in range(0, n):
	txy = input().split()
	t = int(txy[0])
	x = int(txy[1])
	y = int(txy[2])
	if t == 1:
		p1 += 10
		s1 += x
	else:
		p2 += 10
		s2 += x
if s1 >= p1 / 2:
	print('LIVE')
else:
	print('DEAD')
if s2 >= p2 / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
x1 = x2 = y1 = y2 = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		x1 += x
		y1 += y
	else:
		x2 += x
		y2 += y
print('LIVE' if x1 >= y1 else 'DEAD')
print('LIVE' if x2 >= y2 else 'DEAD')


q = lambda : map(int, input().split())
qi = lambda : int(input())
qs = lambda : input().split()
(x1, y1, x2, y2) = (0, 0, 0, 0)
for i in range(qi()):
	(t, x, y) = q()
	if t == 1:
		(x1, y1) = (x1 + x, y1 + y)
	else:
		(x2, y2) = (x2 + x, y2 + y)
print('LIVE' if x1 >= y1 else 'DEAD')
print('LIVE' if x2 >= y2 else 'DEAD')


import time
import collections

class Time_test:

	def __enter__(self):
		self.enter_time = time.time()

	def __exit__(self, exc_type, exc_val, exc_tb):
		print('Command was executed in', time.time() - self.enter_time)
arr = [[0, 0], [0, 0]]
n = int(input())
for i in range(n):
	(t, x, y) = [int(x) for x in input().split()]
	t -= 1
	arr[t][0] += x
	arr[t][1] += y
if arr[0][0] >= arr[0][1]:
	print('LIVE')
else:
	print('DEAD')
if arr[1][0] >= arr[1][1]:
	print('LIVE')
else:
	print('DEAD')


R = lambda : [int(x) for x in input().split()]
nb_cases = int(input())
a = [0, 0]
b = [0, 0]
for _ in range(nb_cases):
	(server, worked, failed) = R()
	if server == 1:
		a[0] += worked
		a[1] += failed
	else:
		b[0] += worked
		b[1] += failed
print('LIVE' if a[0] >= a[1] else 'DEAD')
print('LIVE' if b[0] >= b[1] else 'DEAD')


(n, a) = (int(input()), ['', [], []])
for _ in [0] * n:
	(x, y, _) = map(int, input().split())
	a[x].append(y)
print(*(['LIVE', 'DEAD'][sum(a[x]) < 5 * len(a[x])] for x in [1, 2]), sep='\n')


n = int(input())
q = 0
e = 0
w = 0
r = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		q += x
		w += 10
	else:
		e += x
		r += 10
if q < w // 2:
	print('DEAD')
else:
	print('LIVE')
if e < r // 2:
	print('DEAD')
else:
	print('LIVE')


l1 = []
l2 = []
m2 = []
m1 = []
for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a == 1:
		l1.append(b)
		l2.append(c)
	else:
		m1.append(b)
		m2.append(c)
if sum(l1) >= sum(l2):
	print('LIVE')
else:
	print('DEAD')
if sum(m1) >= sum(m2):
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(ta, tb, la, lb) = (0, 0, 0, 0)
for i in range(n):
	(x, t, l) = map(int, input().split(' '))
	if x == 1:
		ta += t
		la += l
	else:
		tb += t
		lb += l
if ta < la:
	print('DEAD')
else:
	print('LIVE')
if tb < lb:
	print('DEAD')
else:
	print('LIVE')


from math import *
from copy import *
from string import *
from random import *
from sys import stdin
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math

def bin1(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = k ** mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin1(mid + 1, r, k, t, b, val, ans)
		else:
			return bin1(l, mid - 1, k, t, b, val, ans)

def bin2(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = t * k ** mid + b * mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin2(l, mid - 1, k, t, b, val, ans)
		else:
			return bin2(mid + 1, r, k, t, b, val, ans)

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	l = []
	for i in range(2, n + 1):
		if prime[i]:
			l.append(i)
	return l

def bin(l, r, ll, val):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		if val >= ll[mid][0] and val <= ll[mid][1]:
			return mid
		elif val < ll[mid][0]:
			return bin(l, mid - 1, ll, val)
		else:
			return bin(mid + 1, r, ll, val)

def deci(n):
	s = ''
	while n != 0:
		if n % 2 == 0:
			n = n // 2
			s = '0' + s
		else:
			n = n // 2
			s = '1' + s
	return s

def diff(s1, s2):
	if len(s1) < len(s2):
		v = len(s1)
		while v != len(s2):
			s1 = '0' + s1
			v = v + 1
	else:
		v = len(s2)
		while v != len(s1):
			s2 = '0' + s2
			v = v + 1
	c = 0
	for i in range(len(s1)):
		if s1[i:i + 1] != s2[i:i + 1]:
			c = c + 1
	return c
from sys import stdin, stdout

def fac(a, b):
	v = a
	while a != b:
		v *= a - 1
		a = a - 1
	return v

def bino(l, r, n):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		val1 = math.log(n / mid + 1, 2)
		val2 = int(val1)
		if val1 == val2:
			return val1
		elif val1 < 1.0:
			return bino(l, mid - 1, n)
		else:
			return bino(mid + 1, r, n)

def binary(l, r, ll, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		if ll[mid] == val:
			return ll[mid]
		elif ll[mid] < val:
			ans = ll[mid]
			return binary(mid + 1, r, ll, val, ans)
		else:
			return binary(l, mid - 1, ll, val, ans)

def check(n):
	v = 1
	while n != 0:
		if n % 10 == 0 or n % 10 == 1:
			n = n // 10
		else:
			v = 0
			break
	return v
n = int(input())
t1 = 0
t2 = 0
r1 = 0
r2 = 0
for i in range(n):
	(x, y, z) = map(int, input().split(' '))
	if x == 1:
		r1 += y
		t1 += y
		t1 += z
	else:
		r2 += y
		t2 += y
		t2 += z
if r1 >= t1 // 2:
	print('LIVE')
else:
	print('DEAD')
if r2 >= t2 // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
su = suk = su1 = suk1 = 0
for x in range(n):
	(a, b, c) = map(int, input().split())
	if a == 1:
		su += 1
		suk += b
	else:
		su1 += 1
		suk1 += b
if su * 5 <= suk:
	print('LIVE')
else:
	print('DEAD')
if su1 * 5 <= suk1:
	print('LIVE')
else:
	print('DEAD')


no_of_servers = int(input())
packets = [list(map(int, input().split(' '))) for i in range(no_of_servers)]
severA = [i[1] for i in packets if i[0] == 1]
severB = [i[1] for i in packets if i[0] == 2]
if sum(severA) >= len(severA) * 5:
	print('LIVE')
else:
	print('DEAD')
if sum(severB) >= len(severB) * 5:
	print('LIVE')
else:
	print('DEAD')


def check(n1, n2):
	if n1 >= n2:
		print('LIVE')
	else:
		print('DEAD')
(a_rec, a_nrec) = (0, 0)
(b_rec, b_nrec) = (0, 0)
for _ in range(int(input())):
	(t, x, y) = [int(j) for j in input().split()]
	if t == 1:
		a_rec += x
		a_nrec += y
	else:
		b_rec += x
		b_nrec += y
check(a_rec, a_nrec)
check(b_rec, b_nrec)


n = int(input())
a = [i for i in range(0, n)]
for i in range(0, n):
	a[i] = list(map(int, input().split()))
pats = 0
paus = 0
pbts = 0
pbus = 0
for j in range(0, n):
	if a[j][0] == 1:
		pats = pats + 10
		paus = paus + a[j][2]
	if a[j][0] == 2:
		pbts = pbts + 10
		pbus = pbus + a[j][2]
if pats - paus >= paus:
	print('LIVE')
if pats - paus < paus:
	print('DEAD')
if pbts - pbus >= pbus:
	print('LIVE')
if pbts - pbus < pbus:
	print('DEAD')


s1 = 0
s2 = 0
n1 = 0
n2 = 0
for _ in range(int(input())):
	x = list(map(int, input().split()))
	if x[0] == 1:
		s1 += x[1]
		n1 += 1
	if x[0] == 2:
		s2 += x[1]
		n2 += 1
if s1 >= n1 * 5:
	print('LIVE')
else:
	print('DEAD')
if s2 >= n2 * 5:
	print('LIVE')
else:
	print('DEAD')


x1 = 0
y1 = 0
x2 = 0
y2 = 0
for i in range(int(input())):
	(ab, x, y) = map(int, input().split())
	if ab == 1:
		x1 += x
		y1 += y
	else:
		x2 += x
		y2 += y
if x1 >= (x1 + y1) // 2:
	print('LIVE')
else:
	print('DEAD')
if x2 >= (x2 + y2) // 2:
	print('LIVE')
else:
	print('DEAD')


l = [[0, 0], [0, 0]]
n = int(input())
for i in range(n):
	(t, y, n) = map(int, input().split())
	l[t - 1][0] += y
	l[t - 1][1] += n
for i in l:
	if i[0] >= i[1]:
		print('LIVE')
	else:
		print('DEAD')


n = int(input())
ping_a = 0
ping_b = 0
count_a = 0
for i in range(n):
	(x, y, z) = input().split()
	if int(x) == 1:
		ping_a = ping_a + int(y)
		count_a = count_a + 1
	else:
		ping_b = ping_b + int(y)
count_b = n - count_a
count_a = count_a * 10 // 2
count_b = count_b * 10 // 2
if ping_a >= count_a:
	print('LIVE')
else:
	print('DEAD')
if ping_b >= count_b:
	print('LIVE')
else:
	print('DEAD')


(a, b) = ([], [])
n = int(input())
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		a.append(x)
	else:
		b.append(x)
if len(a) * 5 <= sum(a):
	print('LIVE')
else:
	print('DEAD')
if len(b) * 5 <= sum(b):
	print('LIVE')
else:
	print('DEAD')


def main():
	n = int(input())
	(LIVE, DEAD) = ([0, 0, 0], [0, 0, 0])
	for _ in range(n):
		(t, x, y) = map(int, input().split())
		LIVE[t] += x
		DEAD[t] += y
	for _ in (1, 2):
		print(('LIVE', 'DEAD')[LIVE[_] < DEAD[_]])

def __starting_point():
	main()
__starting_point()


n = int(input())
ta = 0
tb = 0
ra = 0
rb = 0
for i in range(n):
	(t, a, b) = map(int, input().split())
	if t == 1:
		ta += a + b
		ra += a
	if t == 2:
		tb += a + b
		rb += a
if ra >= ta // 2:
	print('LIVE')
else:
	print('DEAD')
if rb >= tb // 2:
	print('LIVE')
else:
	print('DEAD')


from math import *
from cmath import *
from itertools import *
from decimal import *
from fractions import *
from sys import *
from types import new_class
n = int(input())
k = [[0, 0], [0, 0]]
for x in range(n):
	(id, a, b) = map(int, input().split())
	k[id - 1][0] += a
	k[id - 1][1] += b
for x in range(2):
	print(['DEAD', 'LIVE'][k[x][0] >= k[x][1]])


I = lambda : map(int, input().split())
n = int(input())
(count1, count2, b1, b2) = (0, 0, 0, 0)
for i in range(n):
	(a, b, c) = I()
	if a == 1:
		b1 += b
		count1 += 1
	else:
		b2 += b
		count2 += 1
if b1 >= 10 * count1 // 2:
	print('LIVE')
else:
	print('DEAD')
if b2 >= 10 * count2 // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(a, b, l, m) = (0, 0, 0, 0)
for i in range(n):
	(t, x, y) = [int(x) for x in input().split()]
	if t == 1:
		l += 1
		a += x
	else:
		m += 1
		b += x
if a >= 5 * l:
	print('LIVE')
else:
	print('DEAD')
if b >= 5 * m:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
s1 = 0
s11 = 0
s2 = 0
s22 = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		s1 += x
		s11 += y
	else:
		s2 += x
		s22 += y
if s1 >= (s11 + s1) // 2:
	print('LIVE')
else:
	print('DEAD')
if s2 >= (s22 + s2) // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
sum1 = 0
sum2 = 0
z = 0
c = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		sum1 += x
		z += 1
	if t == 2:
		sum2 += x
		c += 1
if sum1 >= int(5 * z):
	print('LIVE')
else:
	print('DEAD')
if sum2 >= int(5 * c):
	print('LIVE')
else:
	print('DEAD')


t = int(input())
(d, e) = ('', '')
(l, li, lii, liii) = ([], [], [], [])
for i in range(t):
	(a, b, c) = map(int, input().split())
	if a == 1:
		l.append(b)
		li.append(c)
	else:
		lii.append(b)
		liii.append(c)
(d, e, f, g) = (sum(l), sum(li), sum(lii), sum(liii))
(h, i) = ('', '')
if d >= e:
	h = 'LIVE'
else:
	h = 'DEAD'
if f >= g:
	i = 'LIVE'
else:
	i = 'DEAD'
print(h)
print(i)


import sys
n = int(input())
(a, b) = ([[], []], [[], []])
for i in range(n):
	(t, xi, yi) = map(int, input().split())
	if t == 1:
		a[0].append(xi)
		a[1].append(yi)
	else:
		b[0].append(xi)
		b[1].append(yi)
if sum(a[0]) >= sum(a[1]):
	print('LIVE')
else:
	print('DEAD')
if sum(b[0]) >= sum(b[1]):
	print('LIVE')
else:
	print('DEAD')


n = int(input())
l = [[int(i) for i in input().split()] for i in range(n)]
a = []
b = []
for i in range(n):
	if l[i][0] == 1:
		a.append(l[i][1])
	else:
		b.append(l[i][1])
if sum(a) / len(a) >= 5.0:
	print('LIVE')
else:
	print('DEAD')
if sum(b) / len(b) >= 5.0:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
res1success = 0
res1fail = 0
res2success = 0
res2fail = 0
for i in range(n):
	(s, x, y) = map(int, input().split())
	if s == 1:
		res1success += x
		res1fail += y
	else:
		res2success += x
		res2fail += y
if res1success >= res1fail:
	print('LIVE')
else:
	print('DEAD')
if res2success >= res2fail:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(a_win, a_lost, b_win, b_lost) = (0, 0, 0, 0)
for i in range(n):
	line = list(map(int, input().split()))
	if line[0] == 1:
		a_win += line[1]
		a_lost += line[2]
	elif line[0] == 2:
		b_win += line[1]
		b_lost += line[2]
if a_win >= a_lost:
	print('LIVE')
else:
	print('DEAD')
if b_win >= b_lost:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
x = 0
y = 0
u = 0
z = 0
temp = 0
q = 0
for i in range(n):
	s = list(map(int, input().split()))
	if s[0] == 1:
		x += 10
		temp += s[1]
	elif s[0] == 2:
		y += 10
		q += s[1]
if temp >= x // 2:
	z = 1
if q >= y // 2:
	u = 1
if z == 1:
	print('LIVE')
else:
	print('DEAD')
if u == 1:
	print('LIVE')
else:
	print('DEAD')


a = 0
b = 0
A = 0
B = 0
for i in range(int(input())):
	(t, x, y) = map(int, input().split())
	if t == 1:
		A += 10
		a += x
	else:
		B += 10
		b += x
if a >= A / 2:
	print('LIVE')
else:
	print('DEAD')
if b >= B / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
AL = AR = BL = BR = 0
for i in range(n):
	(a, s, d) = map(int, input().split())
	if a == 1:
		AL += s
		AR += d
	else:
		BL += s
		BR += d
print(['LIVE', 'DEAD'][AL < AR])
print(['LIVE', 'DEAD'][BL < BR])


n = int(input())
mang = [[float(i) for i in input().split()] for j in range(n)]
(a, b, a1, b1) = (0, 0, 0, 0)
for i in range(n):
	if mang[i][0] == 1:
		a = a + mang[i][1] + mang[i][2]
		a1 = a1 + mang[i][1]
	else:
		b = b + mang[i][1] + mang[i][2]
		b1 = b1 + mang[i][1]
if a1 >= a / 2:
	print('LIVE')
else:
	print('DEAD')
if b1 >= b / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(a, b) = (0, 0)
(sa, sb) = (0, 0)
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		a += x
		sa += 10
	else:
		b += x
		sb += 10
if a >= sa // 2:
	print('LIVE')
else:
	print('DEAD')
if b >= sb // 2:
	print('LIVE')
else:
	print('DEAD')


x_a = 0
y_a = 0
x_b = 0
y_b = 0
for _ in range(int(input())):
	(t, x, y) = map(int, input().split())
	if t == 1:
		x_a = x_a + x
		y_a = y_a + y
	else:
		x_b = x_b + x
		y_b = y_b + y
if x_a >= y_a:
	print('LIVE')
else:
	print('DEAD')
if x_b >= y_b:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(u, v) = ([0, 0], [0, 0])
for i in range(n):
	(t, x, y) = map(int, input().split())
	k = int(t == 1)
	u[k] += x
	v[k] += y
print('LDIEVAED'[u[1] < v[1]::2])
print('LDIEVAED'[u[0] < v[0]::2])


n = int(input())
l = []
ct1 = 0
ct2 = 0
x = 0
y = 0
for i in range(n):
	l.append(list(map(int, input().split())))
for i in range(len(l)):
	if l[i][0] == 1:
		x = x + 1
	if l[i][0] == 2:
		y = y + 1
for i in range(len(l)):
	if l[i][0] == 1:
		ct1 = ct1 + l[i][1]
	if l[i][0] == 2:
		ct2 = ct2 + l[i][1]
if ct1 >= x * 10 / 2:
	print('LIVE')
if ct1 < x * 10 / 2:
	print('DEAD')
if ct2 >= y * 10 / 2:
	print('LIVE')
if ct2 < y * 10 / 2:
	print('DEAD')


(x1, y1, x2, y2) = (0, 0, 0, 0)
for i in range(int(input())):
	l = list(map(int, input().split()))
	if l[0] == 1:
		x1 += l[1]
		y1 += l[2]
	else:
		x2 += l[1]
		y2 += l[2]
if x1 >= y1:
	print('LIVE')
else:
	print('DEAD')
if x2 >= y2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(x_a, y_a, x_b, y_b) = (0, 0, 0, 0)
for _ in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		x_a += x
		y_a += y
	elif t == 2:
		x_b += x
		y_b += y
if x_a >= y_a:
	server_a = 'LIVE'
else:
	server_a = 'DEAD'
if x_b >= y_b:
	server_b = 'LIVE'
else:
	server_b = 'DEAD'
print(server_a)
print(server_b)


n = int(input())
(T, X, Y) = ([], [], [])
for i in range(n):
	(ti, xi, yi) = [int(c) for c in input().split()]
	T.append(ti)
	X.append(xi)
	Y.append(yi)
succ_a = succ_b = 0
lost_a = lost_b = 0
for (t, x, y) in zip(T, X, Y):
	if t == 1:
		succ_a += x
		lost_a += y
	else:
		succ_b += x
		lost_b += y
print('LIVE' if succ_a / (succ_a + lost_a) >= 0.5 else 'DEAD')
print('LIVE' if succ_b / (succ_b + lost_b) >= 0.5 else 'DEAD')


n = int(input())
(at, bt, al, bl) = (0, 0, 0, 0)
for _ in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		at += x
		al += y
	if t == 2:
		bt += x
		bl += y
if at >= int((al + at) / 2):
	print('LIVE')
else:
	print('DEAD')
if bt >= int((bl + bt) / 2):
	print('LIVE')
else:
	print('DEAD')


n = int(input())
xsum1 = 0
ysum1 = 0
xsum2 = 0
ysum2 = 0
for i in range(n):
	(t, x, y) = input().split()
	if int(t) == 1:
		xsum1 = xsum1 + int(x)
		ysum1 = ysum1 + int(y)
	elif int(t) == 2:
		xsum2 = xsum2 + int(x)
		ysum2 = ysum2 + int(y)
if xsum1 < ysum1:
	print('DEAD')
else:
	print('LIVE')
if xsum2 < ysum2:
	print('DEAD')
else:
	print('LIVE')


n = int(input())
(s1, s2, g1, g2) = (0, 0, 0, 0)
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		s1 += 1
		g1 += x
	if t == 2:
		s2 += 1
		g2 += x
print(('DEAD', 'LIVE')[g1 >= s1 * 5])
print(('DEAD', 'LIVE')[g2 >= s2 * 5])


n = int(input())
count_i_1 = 0
count_l_1 = 0
count_l_2 = 0
count_i_2 = 0
for i in range(n):
	(t, x, y) = input().split()
	(t, x, y) = (int(t), int(x), int(y))
	if t == 1:
		count_i_1 += x
		count_l_1 += y
	else:
		count_i_2 += x
		count_l_2 += y
if count_i_1 >= count_l_1:
	print('LIVE')
else:
	print('DEAD')
if count_i_2 >= count_l_2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
zero1 = 0
zero2 = 0
zero3 = 0
zero4 = 0
for i in range(n):
	(a, b, c) = map(int, input().split())
	if a == 1:
		zero1 += b
		zero3 += b + c
	else:
		zero2 += b
		zero4 += b + c
if zero1 >= zero3 // 2:
	print('LIVE')
else:
	print('DEAD')
if zero2 >= zero4 // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
d = []
e = []
one = []
two = []
for i in range(n):
	s = [int(i) for i in input().split()]
	d.append(s)

def fil(liste):
	return [liste[0], liste[-2] - liste[-1]]
for i in d:
	e.append(fil(i))
for i in e:
	if i[0] == 1:
		one.append(i[1])
	else:
		two.append(i[1])
allin = [one, two]
for i in allin:
	if sum(i) >= 0:
		print('LIVE')
	else:
		print('DEAD')


n = int(input())
senda = 0
sendb = 0
tla = 0
tlb = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		senda += x
		tla += x + y
	else:
		sendb += x
		tlb += x + y
if senda >= tla / 2:
	print('LIVE')
else:
	print('DEAD')
if sendb >= tlb / 2:
	print('LIVE')
else:
	print('DEAD')


t = int(input())
n = t
count = 0
a1 = []
b1 = []
while t != 0:
	t -= 1
	(t1, a, b) = [int(i) for i in input().split()]
	if t1 == 1:
		a1.append(a)
		count += 1
	else:
		b1.append(a)
m1 = count * 5
m2 = (n - count) * 5
if sum(a1) >= m1:
	print('LIVE')
else:
	print('DEAD')
if sum(b1) >= m2:
	print('LIVE')
else:
	print('DEAD')


a_cnt = 0
b_cnt = 0
for _ in range(int(input())):
	(t, x, y) = [int(i) for i in input().strip().split(' ')]
	if t == 1:
		a_cnt += x - y
	if t == 2:
		b_cnt += x - y
if a_cnt >= 0:
	print('LIVE')
else:
	print('DEAD')
if b_cnt >= 0:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
success = [0, 0]
total = [0, 0]
for _ in range(n):
	(i, x, y) = map(int, input().split())
	total[i - 1] += 10
	success[i - 1] += x
for i in range(2):
	print('LIVE' if success[i] * 2 >= total[i] else 'DEAD')


s = [[0, 0], [0, 0]]
for i in range(int(input())):
	(server, pass_, down) = map(int, input().split())
	s[server - 1][0] += pass_
	s[server - 1][1] += down
print('LIVE' if s[0][0] >= s[0][1] else 'DEAD', 'LIVE' if s[1][0] >= s[1][1] else 'DEAD', sep='\n')


(n, res) = (int(input()), [])
for i in range(n):
	res.append([int(i) for i in input().split()])
(a1, a2, b1, b2) = (0, 0, 0, 0)
for i in res:
	if i[0] == 1:
		a1 += i[1]
		a2 += i[2]
	else:
		b1 += i[1]
		b2 += i[2]
print('LIVE' if a1 >= a2 else 'DEAD')
print('LIVE' if b1 >= b2 else 'DEAD')


n = int(input())
num1 = 0
num2 = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		num1 += 5
		num1 -= y
	else:
		num2 += 5
		num2 -= y
if num1 >= 0:
	print('LIVE')
else:
	print('DEAD')
if num2 >= 0:
	print('LIVE')
else:
	print('DEAD')


t = int(input())
x = 0
y = 0
p = 0
q = 0
for i in range(1, t + 1):
	(a, b, c) = [int(j) for j in input().split()]
	if a == 1:
		x = x + b
		p = p + c
	if a == 2:
		y = y + b
		q = q + c
if x > p - 1:
	print('LIVE')
else:
	print('DEAD')
if y > q - 1:
	print('LIVE')
else:
	print('DEAD')


t = int(input())
lst = []
for i in range(t):
	lst.append(list(map(int, input().split())))
a = 0
al = 0
b = 0
bl = 0
for i in lst:
	if i[0] == 1:
		a += i[1]
		al += i[2]
	else:
		b += i[1]
		bl += i[2]
if a >= al:
	print('LIVE')
else:
	print('DEAD')
if b >= bl:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
l = []
for i in range(n):
	r = list(map(int, input().split()))
	l.append(r)
count = 0
plus = 0
z = 0
w = 0
for i in range(n):
	if l[i][0] == 1:
		count = count + l[i][2]
		plus = plus + l[i][1]
	if l[i][0] == 2:
		z = z + l[i][2]
		w = w + l[i][1]
if plus >= count:
	print('LIVE')
else:
	print('DEAD')
if w >= z:
	print('LIVE')
else:
	print('DEAD')


(n, status, packages) = (int(input()), [0] * 2, [0] * 2)
for _ in range(n):
	(server, x, y) = map(int, input().split())
	packages[server - 1] += 10
	status[server - 1] += x
print(['DEAD', 'LIVE'][status[0] > 0 and status[0] >= packages[0] // 2])
print(['DEAD', 'LIVE'][status[1] > 0 and status[1] >= packages[1] // 2])


a = [0] * 2
b = [0] * 2
for k in range(int(input())):
	t = list(map(int, input().split()))
	if t[0] == 1:
		a[0] += t[1]
		a[1] += t[2]
	else:
		b[0] += t[1]
		b[1] += t[2]
if a[0] >= sum(a) // 2:
	print('LIVE')
else:
	print('DEAD')
if b[0] >= sum(b) // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
cnt = [0, 0]
for i in range(n):
	a = list(map(int, input().split()))
	cnt[a[0] - 1] += a[1] - a[2]
for elem in cnt:
	if elem >= 0:
		print('LIVE')
	else:
		print('DEAD')


def solution(l1):
	i = 0
	(a_lost, a_got) = (0, 0)
	(b_lost, b_got) = (0, 0)
	while i < len(l1):
		got = l1[i][1]
		lost = l1[i][2]
		if l1[i][0] == 1:
			a_lost += lost
			a_got += got
		else:
			b_lost += lost
			b_got += got
		i += 1
	if a_lost > a_got:
		print('DEAD')
	else:
		print('LIVE')
	if b_lost > b_got:
		print('DEAD')
	else:
		print('LIVE')

def answer():
	n = int(input())
	l1 = []
	while n:
		a = [int(x) for x in input().split()]
		l1.append(a)
		n -= 1
	solution(l1)
answer()


i = int(input())
m = 0
n = 0
c = 0
d = 0
for x in range(i):
	l = list(map(int, input().split()))
	if l[0] == 1:
		m += l[1]
		n += l[2]
	else:
		c += l[1]
		d += l[2]
if m >= n:
	print('LIVE')
else:
	print('DEAD')
if c >= d:
	print('LIVE')
else:
	print('DEAD')


(v1, v2, s1, s2) = (0, 0, 0, 0)

def ping(l):
	global v1, v2, s1, s2
	if l[0] == 1:
		v1 += l[1]
		s1 = s1 + l[1] + l[2]
	else:
		v2 += l[1]
		s2 = s2 + l[1] + l[2]
for t in range(int(input())):
	l = list(map(int, input().split()))
	ping(l)
if v1 >= s1 / 2:
	print('LIVE')
else:
	print('DEAD')
if v2 >= s2 / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(x1, y1, x2, y2) = (0, 0, 0, 0)
for _ in range(n):
	a = list(map(int, input().split()))
	if a[0] == 1:
		x1 = x1 + a[1]
		y1 = y1 + a[2]
	else:
		x2 = x2 + a[1]
		y2 = y2 + a[2]
if x1 >= y1:
	print('LIVE')
else:
	print('DEAD')
if x2 >= y2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
c = 0
k = 0
count = 0
count1 = 0
fin = ''
for i in range(n):
	(t, a, b) = map(int, input().split())
	if t == 1:
		c += a
		count += 1
	else:
		k += a
		count1 += 1
fin = 'LIVE' if c >= count * 10 // 2 else 'DEAD'
print(fin)
fin = 'LIVE' if k >= count1 * 10 // 2 else 'DEAD'
print(fin)


n = int(input())
result1 = 0
result2 = 0
for i in range(n):
	(ttt, pos, neg) = list(map(int, input().split()))
	if ttt == 1:
		result1 += pos - neg
	else:
		result2 += pos - neg
print('LIVE' if result1 >= 0 else 'DEAD')
print('LIVE' if result2 >= 0 else 'DEAD')


(s1, s2, e1, e2) = (0, 0, 0, 0)
n = int(input())
for _ in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		s1 += x
		e1 += y
	else:
		s2 += x
		e2 += y
print('LIVE' if s1 >= e1 else 'DEAD')
print('LIVE' if s2 >= e2 else 'DEAD')


n = int(input())
send = [[], []]
for _ in range(n):
	(t, x, y) = tuple(map(int, input().split()))
	send[t - 1].append(x)
for _ in range(2):
	print('LIVE' if 2 * sum(send[_]) >= 10 * len(send[_]) else 'DEAD')


n = int(input().strip(' '))
server_one = (0, 0)
server_two = (0, 0)
for _ in range(n):
	(t, x, y) = tuple(map(int, input().strip(' ').split(' ')))
	if t == 1:
		server_one = (server_one[0] + x, server_one[1] + y)
	else:
		server_two = (server_two[0] + x, server_two[1] + y)
if server_one[0] >= server_one[1]:
	print('LIVE')
else:
	print('DEAD')
if server_two[0] >= server_two[1]:
	print('LIVE')
else:
	print('DEAD')


x = int(input())
sm = []
for i in range(x):
	sm.append(list(map(int, input().split())))
asuccess = 0
alost = 0
bsuccess = 0
blost = 0
for l in range(x):
	if sm[l][0] == 1:
		asuccess = asuccess + sm[l][1]
		alost = alost + sm[l][2]
	else:
		bsuccess = bsuccess + sm[l][1]
		blost = blost + sm[l][2]
if asuccess >= alost:
	print('LIVE')
else:
	print('DEAD')
if bsuccess >= blost:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(na, nb, ca, cb) = (0, 0, 0, 0)
while n > 0:
	(x, y, z) = map(int, input().split())
	if x == 1:
		na += 10
		ca += y
	else:
		nb += 10
		cb += y
	n = n - 1
if ca * 2 >= na:
	print('LIVE')
else:
	print('DEAD')
if cb * 2 >= nb:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
a_y = 0
a_x = 0
b_x = 0
b_y = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		a_x += x
		a_y += y
	else:
		b_x += x
		b_y += y
if a_x >= a_y:
	print('LIVE')
else:
	print('DEAD')
if b_x >= b_y:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
a1 = a2 = a3 = a4 = 0
for i in range(n):
	(a, b, c) = map(int, input().split())
	if a == 1:
		a1 += b
		a2 += 10
	else:
		a3 += b
		a4 += 10
if a1 >= a2 // 2:
	print('LIVE')
else:
	print('DEAD')
if a3 >= a4 // 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
a1 = b1 = a2 = b2 = 0
for i in range(n):
	tmp = input().split()
	if int(tmp[0]) == 1:
		a1 += 10
		b1 += int(tmp[1])
	else:
		a2 += 10
		b2 += int(tmp[1])
if b1 >= a1 / 2:
	print('LIVE')
else:
	print('DEAD')
if b2 >= a2 / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
a = A = b = B = 0
for i in range(n):
	C = [t, x, y] = [int(x) for x in input().split()]
	if t == 1:
		a += x
		A += 10
	else:
		b += x
		B += 10
print('LIVE' if a / A >= 0.5 else 'DEAD')
print('LIVE' if b / B >= 0.5 else 'DEAD')


n = int(input())
x_a = 0
y_a = 0
x_b = 0
y_b = 0
for i in range(n):
	packages = input()
	packages = [int(x) for x in packages.split()]
	t = packages[0]
	x = packages[1]
	y = packages[2]
	if t == 1:
		x_a += x
		y_a += y
	else:
		x_b += x
		y_b += y
(first, second) = ('LIVE', 'LIVE')
if x_a < y_a:
	first = 'DEAD'
if x_b < y_b:
	second = 'DEAD'
print(first)
print(second)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	n = I()
	a = b = 0
	_a = _b = 0
	for _ in range(n):
		(x, y, z) = LI()
		if x == 1:
			a += y
			_a += 10
		else:
			b += y
			_b += 10
	if a * 2 >= _a:
		print('LIVE')
	else:
		print('DEAD')
	if b * 2 >= _b:
		print('LIVE')
	else:
		print('DEAD')
main()


n = int(input())
l = []
m = []
count = 0
add = 0
for i in range(n):
	li = list(map(int, input().split()))
	if li[0] == 1:
		l.append(li)
		count += 1
	else:
		m.append(li)
		add += 1
sum1 = 0
sum2 = 0
for row in range(count):
	sum1 += l[row][1]
for col in range(add):
	sum2 += m[col][1]
if sum1 >= int(count) * 5:
	print('LIVE')
else:
	print('DEAD')
if sum2 >= int(add) * 5:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
live_a = 0
dead_a = 0
live_b = 0
dead_b = 0
status_a = False
status_b = False
for i in range(n):
	x = list(map(int, input().split()))
	if x[0] == 1:
		live_a += x[1]
		dead_a += x[2]
	else:
		live_b += x[1]
		dead_b += x[2]
if live_a >= dead_a:
	status_a = True
if live_b >= dead_b:
	status_b = True
print('LIVE' if status_a == True else 'DEAD')
print('LIVE' if status_b == True else 'DEAD')


class Server:

	def __init__(self, a, b):
		self.a = a
		self.b = b

	def add(self, s=0):
		self.s = self.a + self.b
		return int(self.s)

	def np(self):
		return int(self.a)

	def nd(self):
		return int(self.b)
n = int(input())
pd = list()
pd1 = list()
s1 = 0
s2 = 0
s3 = 0
s4 = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		server1 = Server(x, y)
		s1 += server1.np()
		s2 += server1.nd()
	else:
		server2 = Server(x, y)
		s3 += server2.np()
		s4 += server2.nd()
pd.append([s1, s2])
pd1.append([s3, s4])
if pd[0][0] >= pd[0][1]:
	print('LIVE')
else:
	print('DEAD')
if pd1[0][0] >= pd1[0][1]:
	print('LIVE')
else:
	print('DEAD')


(s1, r1) = (0, 0)
(s2, r2) = (0, 0)
for _ in range(int(input())):
	(t, s, l) = map(int, input().split())
	if t == 1:
		s1 += 10
		r1 += s
	else:
		s2 += 10
		r2 += s
if 2 * r1 >= s1:
	print('LIVE')
else:
	print('DEAD')
if 2 * r2 >= s2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
count_a = 0
count_b = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		count_a += x - y
	else:
		count_b += x - y
if count_a >= 0:
	print('LIVE')
else:
	print('DEAD')
if count_b >= 0:
	print('LIVE')
else:
	print('DEAD')


T = int(input())
(a_x, b_y) = (0, 0)
(A_x, B_y) = (0, 0)
for i in range(T):
	(t, x, y) = map(int, input().split())
	if t == 1:
		a_x += x
		b_y += y
	else:
		A_x += x
		B_y += y
if a_x >= b_y:
	print('LIVE')
else:
	print('DEAD')
if A_x > B_y:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(ag, a, bg, b) = (0, 0, 0, 0)
for i in range(n):
	q = [int(i) for i in input().split()]
	if q[0] == 1:
		ag += q[1]
		a += q[1] + q[2]
	elif q[0] == 2:
		bg += q[1]
		b += q[1] + q[2]
print('LIVE' if ag / a >= 0.5 else 'DEAD')
print('LIVE' if bg / b >= 0.5 else 'DEAD')


def main():
	n = int(input())
	a = [0, 0]
	b = [0, 0]
	for _ in range(n):
		(t, x, y) = list(map(int, input().split()))
		if t == 1:
			a[0] += x
			a[1] += y
		else:
			b[0] += x
			b[1] += y
	if a[0] >= a[1]:
		print('LIVE')
	else:
		print('DEAD')
	if b[0] >= b[1]:
		print('LIVE')
	else:
		print('DEAD')
main()


n = int(input())
(a, b) = ([0, 0], [0, 0])
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		a[1] += x
		a[0] += 1
	else:
		b[1] += x
		b[0] += 1
if a[1] / (10 * a[0]) >= 0.5:
	print('LIVE')
else:
	print('DEAD')
if b[1] / (10 * b[0]) >= 0.5:
	print('LIVE')
else:
	print('DEAD')


import time

def evaluatePings(pingesList):
	sumSuccess = 0
	sumLost = 0
	status = ''
	for (inx, ping) in enumerate(pingesList):
		sumSuccess += ping[1]
		sumLost += ping[2]
	if sumSuccess >= sumLost:
		status = 'LIVE'
	else:
		status = 'DEAD'
	return status

def solve():
	pinges = int(input())
	pingesA = []
	pingesB = []
	for x in range(pinges):
		ping = [int(x) for x in input().split()]
		if ping[0] == 1:
			pingesA.append(ping)
		elif ping[0] != 1:
			pingesB.append(ping)
	serverA = evaluatePings(pingesA)
	serverB = evaluatePings(pingesB)
	print(serverA)
	print(serverB)
solve()


n = int(input())
state = [{'all': 0, 'got': 0}, {'all': 0, 'got': 0}]
for _ in range(n):
	(process, got, lost) = [int(x) for x in input().split(' ')]
	state[process - 1]['all'] += 10
	state[process - 1]['got'] += got
for i in range(2):
	if state[i]['got'] * 2 >= state[i]['all']:
		print('LIVE')
	else:
		print('DEAD')


n = int(input())
aReached = 0
aDropped = 0
bReached = 0
bDropped = 0
for i in range(n):
	(t, x, y) = map(int, input().split(' '))
	if t == 1:
		aReached += x
		aDropped += y
	else:
		bReached += x
		bDropped += y
if aReached >= (aReached + aDropped) // 2:
	print('LIVE')
else:
	print('DEAD')
if bReached >= (bReached + bDropped) // 2:
	print('LIVE')
else:
	print('DEAD')


q = int(input())
ax = ay = 0
bx = by = 0
for i in range(q):
	(server, x, y) = map(int, input().split())
	if server == 1:
		ax += x
		ay += y
	else:
		bx += x
		by += y
print('LIVE' if ax >= ay else 'DEAD')
print('LIVE' if bx >= by else 'DEAD')


n = int(input())
a = 0
a1 = 0
b = 0
b1 = 0
for i in range(n):
	(t, x, y) = list(map(int, input().split()))
	if t == 1:
		a += x
		a1 += y
	else:
		b += x
		b1 += y
if a >= a1:
	print('LIVE')
else:
	print('DEAD')
if b >= b1:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
su1 = 0
su2 = 0
for i in range(n):
	(a, b, c) = map(int, input().split())
	if a == 1:
		su1 += b - c
	else:
		su2 += b - c
if su1 < 0:
	print('DEAD')
else:
	print('LIVE')
if su2 < 0:
	print('DEAD')
else:
	print('LIVE')


n = int(input())
s1 = 0
s2 = 0
count1 = 0
count2 = 0
L1 = []
L2 = []
for i in range(n):
	(t, s, f) = map(int, input().split())
	if t == 1:
		count1 += 1
		s1 += s
	else:
		count2 += 1
		s2 += s
L1.append(s1)
L1.append(s2)
L2.append(count1)
L2.append(count2)
for i in range(2):
	if L2[i] * 10 / 2 <= L1[i]:
		print('LIVE')
	else:
		print('DEAD')


n = int(input())
out = []
serarec = []
serasen = []
serbrec = []
serbsen = []
for i in range(n):
	lst = [int(j) for j in input().split(' ')]
	if lst[0] == 1:
		serarec.append(lst[1])
		serasen.append(lst[2])
	else:
		serbrec.append(lst[1])
		serbsen.append(lst[2])
if sum(serarec) >= sum(serasen):
	print('LIVE')
else:
	print('DEAD')
if sum(serbrec) >= sum(serbsen):
	print('LIVE')
else:
	print('DEAD')


def main():
	a_success = 0
	a_failure = 0
	b_success = 0
	b_failure = 0
	for _ in range(int(input())):
		[t, x_success, x_failure] = [int(_) for _ in input().split()]
		if t == 1:
			a_success += x_success
			a_failure += x_failure
		elif t == 2:
			b_success += x_success
			b_failure += x_failure
	print('LIVE' if a_success >= a_failure else 'DEAD')
	print('LIVE' if b_success >= b_failure else 'DEAD')
main()


commands = int(input())
ping_a_sent = 0
ping_a_lost = 0
ping_b_sent = 0
ping_b_lost = 0
for i in range(commands):
	output = input().split(' ')
	output = [int(output[i]) for i in range(3)]
	if output[0] == 1:
		ping_a_sent += output[1]
		ping_a_lost += output[2]
	else:
		ping_b_sent += output[1]
		ping_b_lost += output[2]
if ping_a_sent - ping_a_lost >= 0:
	print('LIVE')
else:
	print('DEAD')
if ping_b_sent - ping_b_lost >= 0:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
aSuccess = 0
bSuccess = 0
aFail = 0
bFail = 0
for _ in range(n):
	(t, success, fail) = map(int, input().split())
	if t == 1:
		aSuccess += success
		aFail += fail
	else:
		bSuccess += success
		bFail += fail
if aSuccess >= aFail:
	print('LIVE')
else:
	print('DEAD')
if bSuccess >= bFail:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
aLive = aDead = bLive = bDead = 0
for i in range(n):
	(s, livePa, deadPa) = map(int, input().split(' '))
	if s == 1:
		aLive += livePa
		aDead += deadPa
	else:
		bLive += livePa
		bDead += deadPa
if aLive >= aDead:
	print('LIVE')
else:
	print('DEAD')
if bLive >= bDead:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
s = [[0, 0], [0, 0]]
for i in range(n):
	x = [int(s) for s in input().split(' ')]
	s[x[0] - 1][0] += x[1]
	s[x[0] - 1][1] += x[2]
for server in s:
	if server[0] >= server[1]:
		print('LIVE')
	else:
		print('DEAD')


z = 0
x = 0
p = 0
v = 0
for _ in ' ' * int(input()):
	(a, b, c) = map(int, input().split())
	if a == 1:
		z += b
		p += 1
	elif a == 2:
		x += b
		v += 1
print('LIVE' if 5 * p <= z else 'DEAD')
print('LIVE' if 5 * v <= x else 'DEAD')


n = int(input())
SuccessA = 0
SuccessB = 0
FailA = 0
FailB = 0
for _ in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		SuccessA += x
		FailA += y
	else:
		SuccessB += x
		FailB += y
if SuccessA >= (SuccessA + FailA) / 2:
	print('LIVE')
else:
	print('DEAD')
if SuccessB >= (SuccessB + FailB) / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
successServerA = 0
successServerB = 0
rejectServerA = 0
rejectServerB = 0
for index in range(n):
	(server, sucess, errors) = map(int, input().split())
	if server == 1:
		successServerA += sucess
		rejectServerA += errors
	else:
		successServerB += sucess
		rejectServerB += errors
kpiA = successServerA / (successServerA + rejectServerA)
kpiB = successServerB / (successServerB + rejectServerB)
if kpiA >= 0.5:
	print('LIVE')
else:
	print('DEAD')
if kpiB >= 0.5:
	print('LIVE')
else:
	print('DEAD')


t = int(input())
(a, b, am, bm) = (0, 0, 0, 0)
for i in range(t):
	(ti, x, y) = [int(x) for x in input().split(' ')]
	if ti == 1:
		am += 10
		a += x
	else:
		bm += 10
		b += x
if a / am >= 0.5:
	print('LIVE')
else:
	print('DEAD')
if b / bm >= 0.5:
	print('LIVE')
else:
	print('DEAD')


a = [[0, 0], [0, 0]]
for cas in range(int(input())):
	(x, y, z) = map(int, input().split())
	x -= 1
	a[x][0] += y
	a[x][1] += z
for i in range(2):
	if a[i][0] >= a[i][1]:
		print('LIVE')
	else:
		print('DEAD')


a = int(input())
cnt = 0
cnd = 0
x = 0
y = 0
for i in range(a):
	(b, c, d) = map(int, input().split())
	if b == 2:
		cnd += c
		y += 1
	else:
		cnt += c
		x += 1
if cnt >= x * 5:
	print('LIVE')
else:
	print('DEAD')
if cnd >= y * 5:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(sa, la) = (0, 0)
(sb, lb) = (0, 0)
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		sa += x
		la += y
	else:
		sb += x
		lb += y
if sa >= la:
	print('LIVE')
else:
	print('DEAD')
if sb >= lb:
	print('LIVE')
else:
	print('DEAD')


a = [0, 0]
b = [0, 0]
for _ in range(int(input())):
	(t, x, y) = [int(i) for i in input().split()]
	if t == 1:
		a[0] += x
		a[1] += 10
	else:
		b[0] += x
		b[1] += 10
if a[0] >= a[1] / 2:
	print('LIVE')
else:
	print('DEAD')
if b[0] >= b[1] / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(tot_a, tot_b, pa, pb) = (0, 0, 0, 0)
for _ in range(n):
	cur = [int(x) for x in input().split()]
	if cur[0] == 1:
		(pa, tot_a) = (pa + cur[1], tot_a + 10)
	else:
		(pb, tot_b) = (pb + cur[1], tot_b + 10)
if tot_a // 2 <= pa:
	print('LIVE')
else:
	print('DEAD')
if tot_b // 2 <= pb:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
aj = 0
az = 0
bj = 0
bz = 0
for i in range(n):
	a = [int(x) for x in input().split()]
	if a[0] == 1:
		aj += a[1]
		az += 10
	else:
		bj += a[1]
		bz += 10
if az <= 2 * aj:
	print('LIVE')
else:
	print('DEAD')
if bz <= 2 * bj:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
countA = 0
totalA = 0
countB = 0
totalB = 0
for i in range(0, n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		countA = countA + x
		totalA = totalA + 10
	else:
		countB = countB + x
		totalB = totalB + 10
if countA >= totalA / 2:
	print('LIVE')
else:
	print('DEAD')
if countB >= totalB / 2:
	print('LIVE')
else:
	print('DEAD')


serverA = 0
serverB = 0
totalA = 0
totalB = 0
for _ in range(int(input())):
	p = list(map(int, input().split()))
	if p[0] == 1:
		serverA += p[1]
		totalA += 10
	else:
		serverB += p[1]
		totalB += 10
print('LIVE' if serverA >= totalA // 2 else 'DEAD')
print('LIVE' if serverB >= totalB // 2 else 'DEAD', end='')


l = int(input())
total_sent = total_lost = 0
total_sent1 = total_lost1 = 0
for i in range(l):
	(t, x, y) = map(int, input().split())
	if t == 1:
		total_sent += x
		total_lost += y
	elif t == 2:
		total_sent1 += x
		total_lost1 += y
if total_lost > total_sent:
	print('DEAD')
else:
	print('LIVE')
if total_lost1 > total_sent1:
	print('DEAD')
else:
	print('LIVE')


cnt1 = cnt2 = 0
for i in range(int(input())):
	x = [int(x) for x in input().split()]
	if x[0] == 1:
		cnt1 = cnt1 + x[1] - x[2]
	else:
		cnt2 = cnt2 + x[1] - x[2]
print('LIVE' if cnt1 >= 0 else 'DEAD')
print('LIVE' if cnt2 >= 0 else 'DEAD')


def max1(a):
	p = a[0]
	for x in a:
		if x > p:
			p = x
	return p

def prlist(a):
	for x in a:
		print(x, end=' ')
n = int(input())
a = []
for i in range(n):
	b = list(map(int, input().split()))
	a.append(b)
k1 = 0
k2 = 0
t1 = 0
t2 = 0
for i in range(n):
	if a[i][0] == 1:
		k1 += 1
		t1 += a[i][1]
	else:
		k2 += 1
		t2 += a[i][1]
if k1 * 5 > t1:
	print('DEAD')
else:
	print('LIVE')
if k2 * 5 > t2:
	print('DEAD')
else:
	print('LIVE')


def main():
	n = int(input())
	data1 = []
	data2 = []
	for i in range(n):
		vals = [int(v) for v in input().split()]
		if vals[0] == 1:
			data1.append(vals)
		else:
			data2.append(vals)
	if sum((d[1] for d in data1)) >= sum((d[2] for d in data1)):
		print('LIVE')
	else:
		print('DEAD')
	if sum((d[1] for d in data2)) >= sum((d[2] for d in data2)):
		print('LIVE')
	else:
		print('DEAD')
main()


n = int(input())
lst1 = []
lst2 = []
lst3 = []
for j in range(n):
	x = input().split()
	lst1.append(x[0])
	lst2.append(x[1])
	lst3.append(x[2])
lst4 = list(zip(lst1, lst2, lst3))
(counta, countb) = (0, 0)
(ac1, ac2) = (0, 0)
for i in range(len(lst4)):
	if int(lst4[i][0]) == 1:
		counta += int(lst4[i][1]) + int(lst4[i][2])
		ac1 += int(lst4[i][1])
	elif int(lst4[i][0]) != 1:
		countb += int(lst4[i][1]) + int(lst4[i][2])
		ac2 += int(lst4[i][1])
if ac1 * 2 >= counta:
	print('LIVE')
else:
	print('DEAD')
if ac2 * 2 >= countb:
	print('LIVE')
else:
	print('DEAD')


t = int(input())
x1 = x2 = y1 = y2 = 0
while t:
	t = t - 1
	(a, x, y) = [int(x) for x in input().split()]
	if a == 1:
		x1 = x1 + x
		y1 = y1 + y
	else:
		x2 = x2 + x
		y2 = y2 + y
if x1 >= y1:
	print('LIVE')
else:
	print('DEAD')
if x2 >= y2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(one, two) = (0, 0)
for i in range(n):
	a = list(map(int, input().split()))
	(t, x, y) = (a[0], a[1], a[2])
	if t == 1:
		one += x - y
	else:
		two += x - y
print('DEAD' if one < 0 else 'LIVE')
print('DEAD' if two < 0 else 'LIVE')


lenght = int(input())
arr = []
for i in range(0, lenght):
	string = input()
	tmp = []
	for j in string.split(' '):
		tmp.append(j)
	arr.append(tmp)
aX = 0
aY = 0
bX = 0
bY = 0
for i in arr:
	if i[0] == '1':
		aX += int(i[1])
		aY += int(i[2])
	else:
		bX += int(i[1])
		bY += int(i[2])
if aX >= aY:
	print('LIVE')
else:
	print('DEAD')
if bX >= bY:
	print('LIVE')
else:
	print('DEAD')


import math

def main_function():
	pings = [[0 for i in range(2)] for i in range(2)]
	input_list = [[int(i) for i in input().split(' ')] for i in range(int(input()))]
	for i in input_list:
		if i[0] == 1:
			pings[0][0] += i[1]
			pings[0][1] += i[2]
		else:
			pings[1][0] += i[1]
			pings[1][1] += i[2]
	output_list = []
	if pings[0][0] >= pings[0][1]:
		output_list.append('LIVE')
	else:
		output_list.append('DEAD')
	if pings[1][0] >= pings[1][1]:
		output_list.append('LIVE')
	else:
		output_list.append('DEAD')
	return '\n'.join(output_list)
print(main_function())


n = int(input())
l = []
for i in range(n):
	s = input()
	s = s.split()
	s = [int(i) for i in s]
	l.append(s)
a = [0, 0]
b = [0, 0]
for i in l:
	if i[0] == 1:
		a[0] += i[1]
		a[1] += i[1] + i[2]
	else:
		b[0] += i[1]
		b[1] += i[1] + i[2]
if a[0] >= a[1] / 2:
	print('LIVE')
else:
	print('DEAD')
if b[0] >= b[1] / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
s1 = 0
s2 = 0
u1 = 0
u2 = 0
for i in range(n):
	l = list(map(int, input().split()))
	if l[0] == 1:
		u1 += 1
		s1 += l[1]
	elif l[0] == 2:
		u2 += 1
		s2 += l[1]
if u1 * 10 / 2 <= s1:
	print('LIVE')
else:
	print('DEAD')
if u2 * 10 / 2 <= s2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
x1 = 0
x2 = 0
p1 = 0
p2 = 0
for i in range(n):
	a = input().split()
	if a[0] == '1':
		p1 += int(a[1])
		x1 += 10
	if a[0] == '2':
		p2 += int(a[1])
		x2 += 10
if p1 >= x1 / 2:
	print('LIVE')
else:
	print('DEAD')
if p2 >= x2 / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
xsa = 0
ysa = 0
xsb = 0
ysb = 0
for i in range(n):
	inp = [int(i) for i in input().split()]
	t = inp[0]
	x = inp[1]
	y = inp[2]
	if t == 1:
		xsa += x
		ysa += y
	else:
		xsb += x
		ysb += y
if xsa >= ysa:
	print('LIVE')
else:
	print('DEAD')
if xsb >= ysb:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(count1, count2, count3, count4) = (0, 0, 0, 0)
for i in range(n):
	(t, x, y) = [int(j) for j in input().split()]
	if t == 1:
		count1 += x
		count2 += 10
	else:
		count3 += x
		count4 += 10
if 2 * count1 >= count2:
	print('LIVE')
else:
	print('DEAD')
if 2 * count3 >= count4:
	print('LIVE')
else:
	print('DEAD')


x = int(input())
L = []
for i in range(x):
	L.append(list(map(int, input().split())))
count1 = 0
count2 = 0
for i in range(x):
	if L[i][0] == 1:
		count1 += L[i][1] - 5
	if L[i][0] == 2:
		count2 += L[i][1] - 5
if count1 >= 0:
	print('LIVE')
else:
	print('DEAD')
if count2 >= 0:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
cnt = [0, 0]
for i in range(n):
	arr = [int(i) for i in input().split()]
	cnt[arr[0] - 1] += arr[1] - arr[2]
for i in cnt:
	if i >= 0:
		print('LIVE')
	else:
		print('DEAD')


(sum_a, sum_b) = (0, 0)
for i in range(int(input())):
	list1 = list(map(int, input().split()))
	if list1[0] == 1:
		sum_a += list1[1]
		sum_a -= list1[2]
	else:
		sum_b += list1[1]
		sum_b -= list1[2]
print('LIVE' if sum_a >= 0 else 'DEAD')
print('LIVE' if sum_b >= 0 else 'DEAD')


n = int(input())
a = 0
b = 0
x = 0
y = 0
l = []
p = 0
q = 0
for i in range(n):
	s = input().split()
	l.append(s)
	if s[0] == '1':
		x += 1
	elif s[0] == '2':
		y += 1
for j in range(n):
	if l[j][0] == '1':
		p += int(l[j][1])
	if l[j][0] == '2':
		q += int(l[j][1])
if p >= x * 5:
	a = 1
else:
	a = 0
if q >= y * 5:
	b = 1
else:
	b = 0
if a == 1:
	print('LIVE')
elif a == 0:
	print('DEAD')
if b == 1:
	print('LIVE')
elif b == 0:
	print('DEAD')


n = int(input())
i = int(0)
k1 = int(0)
k2 = int(0)
o = int(0)
p = int(0)
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		k1 += x + y
		o += x
	else:
		k2 += x + y
		p += x
if k1 / 2 <= o:
	print('LIVE')
else:
	print('DEAD')
if k2 / 2 <= p:
	print('LIVE')
else:
	print('DEAD')


import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *

class Scanner:

	@staticmethod
	def int():
		return int(sys.stdin.readline().rstrip())

	@staticmethod
	def string():
		return sys.stdin.readline().rstrip()

	@staticmethod
	def map_int():
		return [int(x) for x in Scanner.string().split()]

	@staticmethod
	def string_list(n):
		return [input() for i in range(n)]

	@staticmethod
	def int_list_list(n):
		return [Scanner.map_int() for i in range(n)]

	@staticmethod
	def int_cols_list(n):
		return [int(input()) for i in range(n)]

class Math:

	@staticmethod
	def gcd(a, b):
		if b == 0:
			return a
		return Math.gcd(b, a % b)

	@staticmethod
	def lcm(a, b):
		return a * b // Math.gcd(a, b)

	@staticmethod
	def divisor(n):
		res = []
		i = 1
		for i in range(1, int(n ** 0.5) + 1):
			if n % i == 0:
				res.append(i)
				if i != n // i:
					res.append(n // i)
		return res

	@staticmethod
	def round_up(a, b):
		return -(-a // b)

	@staticmethod
	def is_prime(n):
		if n < 2:
			return False
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		d = int(n ** 0.5) + 1
		for i in range(3, d + 1, 2):
			if n % i == 0:
				return False
		return True

def pop_count(x):
	x = x - (x >> 1 & 6148914691236517205)
	x = (x & 3689348814741910323) + (x >> 2 & 3689348814741910323)
	x = x + (x >> 4) & 1085102592571150095
	x = x + (x >> 8)
	x = x + (x >> 16)
	x = x + (x >> 32)
	return x & 127
MOD = int(1000000000.0) + 7
INF = int(1000000000000000.0)

def solve():
	N = Scanner.int()
	(ax, ay, bx, by) = (0, 0, 0, 0)
	for _ in range(N):
		(t, x, y) = Scanner.map_int()
		if t == 1:
			ax += x
			ay += y
		else:
			bx += x
			by += y
	if ax >= ay:
		print('LIVE')
	else:
		print('DEAD')
	if bx >= by:
		print('LIVE')
	else:
		print('DEAD')

def main():
	solve()
main()


num = int(input())
(sumA, sumB) = (0, 0)
(okA, okB) = (0, 0)
for i in range(num):
	lst = [int(x) for x in input().split()]
	if lst[0] == 1:
		sumA += 10
		okA += lst[1]
	else:
		sumB += 10
		okB += lst[1]
lst_s = ['LIVE', 'DEAD']
if okA * 2 >= sumA:
	print(lst_s[0])
else:
	print(lst_s[1])
if okB * 2 >= sumB:
	print(lst_s[0])
else:
	print(lst_s[1])


n = int(input())
(umerlo1, umerlo2, givo1, givo2) = (0, 0, 0, 0)
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		givo1 += x
		umerlo1 += y
	else:
		givo2 += x
		umerlo2 += y
if givo1 >= umerlo1:
	print('LIVE')
else:
	print('DEAD')
if givo2 >= umerlo2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
A = [[1, 0, 0], [2, 0, 0]]
for _ in range(n):
	(i, a, b) = map(int, input().split())
	A[i - 1][1] += a
	A[i - 1][2] += b
for j in A:
	if j[1] >= j[2]:
		print('LIVE')
	else:
		print('DEAD')


class Server:

	def __init__(self, x, y):
		self.x = x
		self.y = y
n = int(input())
servers = [Server(0, 0) for i in range(2)]
for _ in range(n):
	(t, x, y) = map(int, input().split())
	servers[t - 1].x += x
	servers[t - 1].y += y
for i in range(2):
	if servers[i].x * 2 >= servers[i].x + servers[i].y:
		print('LIVE')
	else:
		print('DEAD')


n = int(input())
a = 0
aa = 0
b = 0
bb = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		aa += y
		a += x
	else:
		bb += y
		b += x
if a >= aa:
	print('LIVE')
else:
	print('DEAD')
if b >= bb:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
z = 0
x = 0
c = 0
v = 0
for i in range(n):
	(a, b, k) = map(int, input().split())
	if a == 1:
		z += b
		x += 10
	else:
		c += b
		v += 10
if z >= int(x / 2):
	print('LIVE')
else:
	print('DEAD')
if c >= int(v / 2):
	print('LIVE')
else:
	print('DEAD')


x = int(input())
y = []
b = 0
c = 0
a = 0
d = 0
for i in range(x):
	y.append(list(map(int, input().split(' '))))
for j in range(x):
	if y[j][0] == 1:
		b += 10
		c += y[j][1]
	else:
		a += 10
		d += y[j][1]
if c >= b / 2:
	print('LIVE')
else:
	print('DEAD')
if d >= a / 2:
	print('LIVE')
else:
	print('DEAD')


def status(n, ls):
	l1 = 0
	l2 = 0
	c1 = 0
	c2 = 0
	for i in range(n):
		if ls[i][0] == 1:
			l1 = l1 + ls[i][1]
			c1 = c1 + 1
		else:
			l2 = l2 + ls[i][1]
			c2 = c2 + 1
	if l1 >= int(c1 * 10 / 2):
		print('LIVE')
	else:
		print('DEAD')
	if l2 >= int(c2 * 10 / 2):
		print('LIVE')
	else:
		print('DEAD')
n = int(input())
ls = [[int(j) for j in input().split()] for i in range(n)]
status(n, ls)


t = int(input())
s1 = l1 = s2 = l2 = 0
for _ in range(t):
	(n, x, y) = map(int, input().split())
	if n == 1:
		s1 += x
		l1 += y
	else:
		s2 += x
		l2 += y
if s1 >= l1:
	print('LIVE')
else:
	print('DEAD')
if s2 >= l2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
sa = 0
sb = 0
for i in range(n):
	(p, y, n) = list(map(int, input().split()))
	if p == 1:
		sa += y - n
	elif p == 2:
		sb += y - n
if sa >= 0:
	print('LIVE')
else:
	print('DEAD')
if sb >= 0:
	print('LIVE')
else:
	print('DEAD')


from sys import stdin, stdout, exit as sys_ret
(f_input, f_print, f_flush) = (stdin.readline, stdout.write, stdout.flush)
(aX, aY, bX, bY) = (0, 0, 0, 0)
for _ in range(int(f_input())):
	(server, got, missed) = map(int, f_input().split())
	if server == 1:
		aX += got
		aY += missed
	elif server == 2:
		bX += got
		bY += missed
f_print('LIVE\n' if aX >= aY else 'DEAD\n')
f_print('LIVE\n' if bX >= bY else 'DEAD\n')


n = int(input())
ay = 0
an = 0
by = 0
bn = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		ay += x
		an += y
	else:
		by += x
		bn += y
if ay >= an:
	print('LIVE')
else:
	print('DEAD')
if by >= bn:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(ac, at) = (0, 0)
(bc, bt) = (0, 0)
for _ in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		ac += x
		at += x + y
	else:
		bc += x
		bt += x + y
print('LIVE' if ac >= at // 2 else 'DEAD')
print('LIVE' if bc >= bt // 2 else 'DEAD')


n = int(input())
a = [0] * 2
b = [0] * 2
t = []
for _ in range(n):
	t.append(list(map(int, input().split())))
for i in range(n):
	if t[i][0] == 1:
		a[0] += t[i][1]
		a[1] += t[i][2]
	else:
		b[0] += t[i][1]
		b[1] += t[i][2]
if a[0] >= a[1]:
	print('LIVE')
else:
	print('DEAD')
if b[0] >= b[1]:
	print('LIVE')
else:
	print('DEAD')


(m,) = map(int, input().split())
(ca, fa, cb, fb) = (0, 0, 0, 0)
for _ in range(m):
	(t, x, y) = map(int, input().split())
	if t == 1:
		ca += x
		fa += y
	else:
		cb += x
		fb += y
print('LDIEVAED'[ca < fa::2])
print('LDIEVAED'[cb < fb::2])


n = int(input())
txy = [list(map(int, input().split())) for _ in range(n)]
a = [0, 0]
b = [0, 0]
for txyi in txy:
	if txyi[0] == 1:
		a[0] += txyi[1]
		a[1] += txyi[2]
	elif txyi[0] == 2:
		b[0] += txyi[1]
		b[1] += txyi[2]
if a[0] >= a[1]:
	print('LIVE')
elif a[0] < a[1]:
	print('DEAD')
if b[0] >= b[1]:
	print('LIVE')
elif b[0] < b[1]:
	print('DEAD')


a = int(input())
l1 = 0
l2 = 0
for i in range(a):
	c = input().split()
	if c[0] == '1':
		l1 += int(c[1])
		l1 -= int(c[2])
	else:
		l2 += int(c[1])
		l2 -= int(c[2])
if l1 >= 0:
	print('LIVE')
else:
	print('DEAD')
if l2 >= 0:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
a = [0] * n
for i in range(n):
	a[i] = [0] * 3
	a[i] = input().split()
a1 = a2 = b1 = b2 = 0
for i in range(n):
	if a[i][0] == '1':
		a1 += int(a[i][1])
		a2 += int(a[i][2])
	if a[i][0] == '2':
		b1 += int(a[i][1])
		b2 += int(a[i][2])
if a1 >= a2:
	print('LIVE')
else:
	print('DEAD')
if b1 >= b2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(live1, dead1, live2, dead2) = (0, 0, 0, 0)
for i in range(n):
	I = [int(j) for j in input().split()]
	if I[0] == 1:
		live1 += I[1]
		dead1 += I[2]
	else:
		live2 += I[1]
		dead2 += I[2]
if live1 >= (live1 + dead1) / 2:
	print('LIVE')
else:
	print('DEAD')
if live2 >= (live2 + dead2) / 2:
	print('LIVE')
else:
	print('DEAD')


num = eval(input())
alist = []
for i in range(num):
	a = input()
	b = a.split()
	c = [int(x) for x in b]
	alist.append(c)
geshua = 0
geshub = 0
zongshua = 0
zongshub = 0
for k in alist:
	if k[0] == 1:
		geshua = geshua + 1
		zongshua = zongshua + k[1]
	else:
		geshub = geshub + 1
		zongshub = zongshub + k[1]
if zongshua >= geshua * 5:
	print('LIVE')
else:
	print('DEAD')
if zongshub >= geshub * 5:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
a = []
(x1, y1) = (0, 0)
(x2, y2) = (0, 0)
for i in range(n):
	b = list(map(int, input().split()))
	a.append(b)
for i in a:
	if i[0] == 1:
		x1 += i[1]
		y1 += i[2]
	elif i[0] == 2:
		x2 += i[1]
		y2 += i[2]
if x1 >= y1:
	print('LIVE')
else:
	print('DEAD')
if x2 >= y2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
l = []
x = []
y = []
z = []
for i in range(n):
	c = list(map(int, input().split()))
	if c[0] == 1:
		l.append(c[1])
		y.append(c[2])
	else:
		x.append(c[1])
		z.append(c[2])
q = sum(l)
w = sum(y) + sum(l)
e = sum(x)
r = sum(x) + sum(z)
if q >= int(w / 2):
	print('LIVE')
else:
	print('DEAD')
if e >= int(r / 2):
	print('LIVE')
else:
	print('DEAD')


line = int(input())
xa = 0
xb = 0
ya = 0
yb = 0
for i in range(line):
	(t, x, y) = (int(v) for v in input().split())
	if t == 1:
		xa += x
		ya += y
	else:
		xb += x
		yb += y
if xa >= ya:
	print('LIVE')
else:
	print('DEAD')
if xb >= yb:
	print('LIVE')
else:
	print('DEAD')


no = int(input())
a_reach = 0
a_fail = 0
b_reach = 0
b_fail = 0
for i in range(no):
	(t, reach, no_reach) = map(int, input().split())
	if t == 1:
		a_reach += reach
		a_fail += no_reach
	else:
		b_reach += reach
		b_fail += no_reach
if a_reach >= a_fail:
	print('LIVE')
else:
	print('DEAD')
if b_reach >= b_fail:
	print('LIVE')
else:
	print('DEAD')


(a, b) = (0, 0)
(sum_a, sum_b) = (0, 0)
for i in range(int(input())):
	(t, x, y) = map(int, input().split())
	if t == 1:
		sum_a += x
		sum_a += y
		a += x + y - y
	else:
		sum_b += x
		sum_b += y
		b += x + y - y
print('LIVE') if a >= sum_a / 2 else print('DEAD')
print('LIVE') if b >= sum_b / 2 else print('DEAD')


n = int(input())
aSended = 0
bSended = 0
aPing = 0
bPing = 0
while n > 0:
	(t, x, y) = map(int, input().split())
	if t == 1:
		aSended = aSended + 10
		aPing = aPing + x
	elif t == 2:
		bSended = bSended + 10
		bPing = bPing + x
	n = n - 1
if int(aSended / 2) <= aPing:
	print('LIVE')
else:
	print('DEAD')
if int(bSended / 2) <= bPing:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
R1 = 0
R2 = 0
L1 = 0
L2 = 0
for i in range(n):
	(b, r, l) = map(int, input().split())
	if b == 1:
		R1 += r
		L1 += l
	else:
		R2 += r
		L2 += l
if R1 >= L1:
	print('LIVE')
else:
	print('DEAD')
if R2 >= L2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(sa, sb) = (0, 0)
ta = 0
tb = 0
for _ in range(n):
	(t, x, y) = list(map(int, input().split()))
	if t == 1:
		sa += x
		ta += x + y
	if t == 2:
		sb += x
		tb += x + y
print('LIVE' if sa / ta >= 0.5 else 'DEAD')
print('LIVE' if sb / tb >= 0.5 else 'DEAD')


n = int(input())
(a_cnt, b_cnt) = (0, 0)
for i in range(n):
	x = list(map(int, input().split()))
	if x[0] == 1:
		a_cnt = a_cnt + x[1] - x[2]
	else:
		b_cnt = b_cnt + x[1] - x[2]
if a_cnt < 0:
	print('DEAD')
elif a_cnt >= 0:
	print('LIVE')
if b_cnt < 0:
	print('DEAD')
elif b_cnt >= 0:
	print('LIVE')


x = int(input())
y = []
k = 0
l = 0
s = 0
s1 = 0
for i in range(x):
	y.append(list(map(int, input().split())))
for i in range(x):
	if y[i][0] == 1:
		t = y[i][1]
		s = s + t
		k = k + 1
	if y[i][0] == 2:
		g = y[i][1]
		s1 = s1 + g
		l = l + 1
if s >= 5 * k:
	print('LIVE')
if s < 5 * k:
	print('DEAD')
if s1 >= 5 * l:
	print('LIVE')
if s1 < 5 * l:
	print('DEAD')


n = eval(input())
j = []
for i in range(n):
	j.append([int(i) for i in input().split(' ')])
j = j[::-1]
l1 = []
l2 = []
for i in j:
	if i[0] == 1:
		l1.append(i)
	if i[0] == 2:
		l2.append(i)
a = sum([i[1] for i in l1]) / (10 * len(l1))
b = sum([i[1] for i in l2]) / (10 * len(l2))
if a >= 0.5:
	print('LIVE')
else:
	print('DEAD')
if b >= 0.5:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
ar = [[0, 0], [0, 0]]
for i in range(n):
	(a, b, c) = input().split()
	a = int(a)
	b = int(b)
	c = int(c)
	ar[a - 1][0] += b
	ar[a - 1][1] += c
if ar[0][1] > ar[0][0]:
	print('DEAD')
else:
	print('LIVE')
if ar[1][1] > ar[1][0]:
	print('DEAD')
else:
	print('LIVE')


a = int(input())
b = []
(x1, x2, count1, count2) = (0, 0, 0, 0)
for x in range(a):
	b.append(list(map(int, input().split())))
	if b[x][0] == 1:
		x1 += b[x][1]
		count1 += 1
	else:
		x2 += b[x][1]
		count2 += 1
if x1 >= count1 * 10 / 2:
	print('LIVE')
elif not x1 > count1 * 10 / 2:
	print('DEAD')
if x2 >= count2 * 10 / 2:
	print('LIVE')
elif not x2 > count2 * 10 / 2:
	print('DEAD')


n = int(input())
x = []
sum1 = 0
sum2 = 0
count1 = 0
count2 = 0
for i in range(n):
	l = list(map(int, input().split()))
	x.append(l)
	if x[i][0] == 1:
		count1 += 1
		sum1 += x[i][1]
	elif x[i][0] == 2:
		count2 += 1
		sum2 += x[i][1]
if sum1 >= count1 * 10 / 2:
	print('LIVE')
else:
	print('DEAD')
if sum2 >= count2 * 10 / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
count = [0, 0]
for i in range(n):
	a = list(map(int, input().split()))
	count[a[0] - 1] += a[1] - a[2]
for j in count:
	if j >= 0:
		print('LIVE')
	else:
		print('DEAD')


num_commands = int(input())
(server_a_sent, server_a_received) = (0, 0)
(server_b_sent, server_b_received) = (0, 0)
for index in range(num_commands):
	inp = input()
	inp = inp.split(' ')
	if inp[0] == '1':
		server_a_sent += 10
		server_a_received += int(inp[1])
	else:
		server_b_sent += 10
		server_b_received += int(inp[1])
if server_a_received / server_a_sent >= 0.5:
	print('LIVE')
else:
	print('DEAD')
if server_b_received / server_b_sent >= 0.5:
	print('LIVE')
else:
	print('DEAD')


a_count = 0
a_ping = 0
b_ping = 0
n = int(input())
for _ in range(n):
	(server, x, y) = map(int, input().split())
	if server == 1:
		a_count += 1
		a_ping += x
	else:
		b_ping += x
if a_count * 5 <= a_ping:
	print('LIVE')
else:
	print('DEAD')
if (n - a_count) * 5 <= b_ping:
	print('LIVE')
else:
	print('DEAD')


num = int(input())
packets = {1: 0, 2: 0}
totals = {1: 0, 2: 0}
for i in range(num):
	(server, good, bad) = list(map(int, input().split()))
	packets[server] += good
	totals[server] += good + bad
for i in range(1, 3):
	if packets[i] / totals[i] >= 0.5:
		print('LIVE')
	else:
		print('DEAD')


n = int(input())
a_accept = 0
a_lost = 0
b_accept = 0
b_lost = 0
for i in range(n):
	(sever, post, lost) = map(int, input().split())
	if sever == 1:
		a_accept = a_accept + post
		a_lost = a_lost + lost
	if sever == 2:
		b_accept = b_accept + post
		b_lost = b_lost + lost
if a_accept >= a_lost:
	a_live = True
else:
	a_live = False
if b_accept >= b_lost:
	b_live = True
else:
	b_live = False
if a_live:
	print('LIVE')
else:
	print('DEAD')
if b_live:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
al = 0
bl = 0
ad = 0
bd = 0
for i in range(n):
	t = list(map(int, input().split(' ')))
	if t[0] == 1:
		al += t[1]
		ad += t[2]
	else:
		bl += t[1]
		bd += t[2]
if al >= ad:
	print('LIVE')
else:
	print('DEAD')
if bl >= bd:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
a = 0
b = 0
a_sent = 0
b_sent = 0
for i in range(0, n):
	(p, x, y) = map(int, input().split())
	if p == 1:
		a = a + x + y
		a_sent = a_sent + x
	else:
		b = b + x + y
		b_sent = b_sent + x
if a_sent >= a / 2:
	print('LIVE')
else:
	print('DEAD')
if b_sent >= b / 2:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
(a, b, x, y) = (0, 0, 0, 0)
for i in range(n):
	(q, w, e) = map(int, input().split())
	if q == 1:
		a += w
		b += e
	else:
		x += w
		y += e
if a >= b:
	print('LIVE')
else:
	print('DEAD')
if x >= y:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
a = []
c = 0
d = 0
e = 0
f = 0
for i in range(n):
	a.append(list(map(int, input().split())))
for j in range(n):
	if a[j][0] == 1:
		c = c + a[j][1]
		e = e + a[j][2]
	else:
		d = d + a[j][1]
		f = f + a[j][2]
if c >= e:
	print('LIVE')
else:
	print('DEAD')
if d >= f:
	print('LIVE')
else:
	print('DEAD')


T_ON = 0
DEBUG_ON = 1
MOD = 998244353

def solve():
	n = read_int()
	A = [[0, 0], [0, 0]]
	for i in range(n):
		(t, x, y) = read_ints()
		A[t - 1][0] += x
		A[t - 1][1] += y
	for a in A:
		if a[0] >= a[1]:
			print('LIVE')
		else:
			print('DEAD')

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def debug(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
import math
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split()))

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def First():
	print('First')

def Second():
	print('Second')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def lcm(a, b):
	d = gcd(a, b)
	return a * b // d

def is_even(x):
	return x % 2 == 0

def is_odd(x):
	return x % 2 == 1

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i:
			return False
	return True

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P
main()


def s():
	n = int(input())
	a_total = 0
	a_fail = 0
	b_total = 0
	b_fail = 0
	for i in range(n):
		(t, x, y) = [int(x) for x in input().split(' ')]
		if t == 1:
			a_total += x + y
			a_fail += y
		else:
			b_total += x + y
			b_fail += y
	if a_fail > a_total // 2:
		print('DEAD')
	else:
		print('LIVE')
	if b_fail > b_total // 2:
		print('DEAD')
	else:
		print('LIVE')
s()


n = int(input())
a = 0
b = 0
sum_a = 0
sum_b = 0
for i in range(n):
	_list = list(map(int, input().split(' ')))
	if _list[0] == 1:
		a += _list[1]
		sum_a += _list[1] + _list[2]
	else:
		b += _list[1]
		sum_b += _list[1] + _list[2]
if 2 * a >= sum_a:
	print('LIVE')
else:
	print('DEAD')
if 2 * b >= sum_b:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
t1 = 0
t2 = 0
s1 = 0
s2 = 0
for i in range(n):
	a = list(map(int, input().split()))
	if a[0] == 1:
		t1 = t1 + 1
		s1 = s1 + a[1]
	else:
		t2 = t2 + 1
		s2 = s2 + a[1]
if 2 * s1 >= t1 * 10:
	print('LIVE')
else:
	print('DEAD')
if 2 * s2 >= t2 * 10:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
ka = 0
xa = 0
kb = 0
xb = 0
for i in range(n):
	(t, x, y) = map(int, input().split())
	if t == 1:
		ka += 1
		xa += x
	else:
		kb += 1
		xb += x
if ka * 5 <= xa:
	print('LIVE')
else:
	print('DEAD')
if kb * 5 <= xb:
	print('LIVE')
else:
	print('DEAD')


n = int(input())
a = 0
b = 0
a1 = 0
b1 = 0
sa = 0
sb = 0
for i in range(n):
	s = [int(j) for j in input().split(' ')]
	t = s[0]
	x = s[1]
	y = s[2]
	if t == 1:
		a1 += x
		a += y
		sa = sa + x + y
	else:
		b1 += x
		b += y
		sb = sb + x + y
if a1 * 2 >= sa:
	print('LIVE')
else:
	print('DEAD')
if b1 * 2 >= sb:
	print('LIVE')
else:
	print('DEAD')


a = input()
a = int(a)
dizio1 = {'mex': 0, 'total': 0}
dizio2 = {'mex': 0, 'total': 0}
for x in range(a):
	k = input().split()
	if int(k[0]) == 1:
		dizio1['mex'] += 10
		dizio1['total'] += int(k[1])
		dizio1['total'] -= int(k[2])
	elif int(k[0]) == 2:
		dizio2['mex'] += 10
		dizio2['total'] += int(k[1])
		dizio2['total'] -= int(k[2])
if dizio1['total'] >= 0:
	print('LIVE')
else:
	print('DEAD')
if dizio2['total'] >= 0:
	print('LIVE')
else:
	print('DEAD')