function Main (input) {
  input = input.split("\n");
  const N = parseInt(input[0], 10);
  const A = input[1].split(" ").map(inp => parseInt(inp, 10));
  var ans1 = [];
  var ans = "APPROVED";
  for (var i = 0; i < N; i++) {
    if (A[i] % 2 == 0) {
      ans1.push(A[i]);
    }
  }
  for (var i of ans1) {
    if (i % 3 != 0 && i % 5 != 0) {
      ans = "DENIED";
      break;
    }
  }
  console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));