function main(input){
    inputI = input.split('\n');
    number = parseInt(inputI[0]);
    inputA = inputI[1].split(' ');
    out='APPROVED';
    check=0;

    for(i=0;i<number;i++){
        check=parseInt(inputA[i]);
        if(check%2==0){
            if(check%3!=0 && check%5!=0){
                out='DENIED';
            }
        }
    }

    console.log(out);

}

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