n = int(input())
a = list(map(int,input().split()))

a = [x for x in a if x % 2 == 0]
a = [x for x in a if x % 3 != 0 and x % 5 != 0]

if len(a) == 0:
    print('APPROVED')
else:
    print('DENIED')
 n = int(input()) n int(input()) int input() input a = list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split x for x in a if x % 2 == 0 for x in a if x % 2 == 0 x a x % 2 == 0 x % 2 x 2 0 if x % 2 == 0 x a = [x for x in a if x % 2 == 0] a [x for x in a if x % 2 == 0] x for x in a if x % 3 != 0 and x % 5 != 0 for x in a if x % 3 != 0 and x % 5 != 0 x a x % 3 != 0 and x % 5 != 0 x % 3 != 0 x % 3 x 3 0 x % 5 != 0 x % 5 x 5 0 if x % 3 != 0 and x % 5 != 0 x a = [x for x in a if x % 3 != 0 and x % 5 != 0] a [x for x in a if x % 3 != 0 and x % 5 != 0] if len(a) == 0:
    print('APPROVED')
else:
    print('DENIED') len(a) == 0 len(a) len a 0 print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' a = [x for x in a if x % 3 != 0 and x % 5 != 0] [x for x in a if x % 3 != 0 and x % 5 != 0] a n = int(input()) int(input()) n a = [x for x in a if x % 2 == 0] [x for x in a if x % 2 == 0] a a = list(map(int,input().split())) list(map(int,input().split())) a
n = int(input())
a = list(map(int,input().split()))

a = [x for x in a if x % 2 == 0]
a = [x for x in a if x % 3 != 0 and x % 5 != 0]

if len(a) == 0:
    print('APPROVED')
else:
    print('DENIED')

