#include <cstdio>
#include <cstring>
int n,a[100001];
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;++i){scanf("%d",&a[i]);if(!(a[i]&1)&&a[i]%3&&a[i]%5){printf("DENIED\n");return 0;}}printf("APPROVED\n");return 0;
}