#include <bits/stdc++.h>

using namespace std;

int main() {

	int n, x;
	scanf("%d", &n);

	while(n--) {
		scanf("%d", &x);
		if(x % 2 == 0) {
			if(x % 3 != 0 and x % 5 != 0) {
				return printf("DENIED\n"), 0;
			}
		}
	}

	printf("APPROVED\n");
}
