#include <bits/stdc++.h>
using namespace std;

int n,a[109],i;

int main() {
  cin>>n;
  for(i=0;i<n;i++)
  cin>>a[i];
  for(i=0;i<n;i++)
  if(a[i]%2==0 && (a[i]%3!=0 && a[i]%5!=0)){
  cout<<"DENIED"<<endl; return 0;
  }
  cout<<"APPROVED"<<endl;
}