#include<bits/stdc++.h>
using namespace std;
int main()
{
	int N,a,f=0;
	cin>>N;
	while(N--)
	{
		cin>>a;
		if(a%2==0&&a%3!=0&&a%5!=0)f=1;
	}
	if(f)cout<<"DENIED";
	else cout<<"APPROVED";
	return 0;
}