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