#include <iostream>

using namespace std;
int a[10010];
int main(){
	int i,n;
	cin >> n;
	for(i=0;i<n;i++){
		cin >> a[i];
		if(a[i]&1) continue;
		if(a[i]%3!=0 && a[i]%5!=0){
			cout << "DENIED" << endl;
			return 0;
		}
	}
	cout << "APPROVED" << endl;
}