#include <bits/stdc++.h>
using namespace std;
int main(void){
    int n,a;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a;
        if(a%2==0&&a%3!=0&&a%5!=0){
            cout<<"DENIED";
            return 0;
        }
    }
    cout<<"APPROVED";
}
