#include <bits/stdc++.h>
using namespace std;
int n,a[102];
int main()
{
	int i;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a[i];
		if(a[i]%2==0&&(a[i]%3!=0&&a[i]%5!=0))
		{
			cout<<"DENIED";
			return 0;
		}
	}
	cout<<"APPROVED";
	return 0;
}