#include<iostream> 
using namespace std;
int main(){
	int n,temp,flag=0;
	cin>>n;
	while(n--){
		cin>>temp;
		if(temp%2==0){
			if(temp%3!=0&&temp%5!=0){
				cout<<"DENIED";
				flag=1;
				break;
			}
		}
	}
	if(flag==0)cout<<"APPROVED";
}