#include <iostream>
using namespace std;

int main() {
	int n,x=1;
	cin>>n;
	int a[n];
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		if(a[i]%2==0)
		{
			if(a[i]%3!=0 && a[i]%5!=0)
			x=0;
		}
	}
	if(x)
	cout<<"APPROVED";
	else
	cout<<"DENIED";
	return 0;
}