#include<iostream>
using namespace std;
int main(){
  int n,a[100];
  string ans="APPROVED";
  cin>>n;
  for(int i=0;i<n;i++){cin>>a[i];if(a[i]%2==0 and a[i]%3!=0 and a[i]%5!=0)ans="DENIED";}
  cout<<ans<<endl;
  return 0;
}