//HovalHaq!
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n; cin >> n;
	while(n--) {
		int x; cin >> x;
		if(x & 1) continue;
		if((x % 3) && (x % 5)) return cout << "DENIED", 0;
	}
	cout << "APPROVED";
}
