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