#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int server, temp;
  int a, b;
  a = 0;
  b = 0;
  int sum1, sum2;
  sum1 = 0;
  sum2 = 0;
  for (int i = 0; i < n; i++) {
    cin >> server;
    if (server == 1) {
      cin >> temp;
      a++;
      sum1 += temp;
    } else {
      cin >> temp;
      b++;
      sum2 += temp;
    }
    cin >> temp;
  }
  if (sum1 / a >= 5)
    cout << "LIVE" << endl;
  else
    cout << "DEAD" << endl;
  if (sum2 / b >= 5)
    cout << "LIVE" << endl;
  else
    cout << "DEAD" << endl;
  return 0;
}
