#include <iostream>
using namespace std;

int main(){
	int n;
	cin>>n;
	bool flag=0;
	for(int i=0;i<n;i++){
		int x;
		cin>>x;
		if(x%2==0){
			if(x%3!=0 && x%5!=0) flag=1;
		}
	}
	if(flag) cout<<"DENIED\n";
	else cout<<"APPROVED\n";
} 