分开依次加
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
struct node
{
int x,y;
};
node g,k;
int main()
{
int n;
cin>>n;
while(n--)
{
int a,b,c;
cin>>a>>b>>c;
if(a==1)
{
g.x+=b;
g.y+=c;
}
else
{
k.x+=b;
k.y+=c;
}
}
if(g.x>=g.y) cout<<"LIVE";
else cout<<"DEAD";
cout<<'\n';
if(k.x>=k.y) cout<<"LIVE";
else cout<<"DEAD";
return 0;
}