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

int main(){
	bool f=true;
	int n,i,m;
	cin>>n;
	for(i=1;i<=n;i++){
		cin>>m;
		if(m%2==0&&m%5!=0&&m%3!=0) f=false;
	}
	if(f==false) cout<<"DENIED";
	else cout<<"APPROVED";
	return 0;
}