'use strict'
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split("\n");
  let line1 = input[0].split(" ");
  let n = line1[0];

  let A = input[1].split(" ");

  let isOK = true;

  for(let i=0; i<A.length; i++) {
    if(A[i]%2 === 0) {
      if(A[i]%3 !== 0 && A[i]%5 !== 0) {
        isOK = false;
      }
    }
  }

  if(isOK) console.log("APPROVED");
  else console.log("DENIED");

}

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