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

int n,x;
bool ok=true;

int main()
{
	cin>>n;
	while(n--)
	{
		cin>>x;
		if(x%2==1 or x%3==0 or x%5==0) continue;
		ok=false;
	}

	if(ok) cout<<"APPROVED";
	else cout<<"DENIED";
}