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

int main(){
	int n,x,f=1;
	cin>>n;
	while(n--){
		cin>>x;
		if (x%2==0 && x%3!=0 && x%5!=0)f=0;
	}
	if(f)cout<<"APPROVED"<<endl;
	else cout<<"DENIED"<<endl;
	return 0;
}
