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