N = int(input())
A = list(map(int, input().split()))
B = [x for x in A if x % 2 == 0 and x % 3 != 0 and x % 5 != 0]
if len(B) > 0:
    print('DENIED')
else:
    print('APPROVED') 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 and x % 3 != 0 and x % 5 != 0 for x in A if x % 2 == 0 and x % 3 != 0 and x % 5 != 0 x A x % 2 == 0 and x % 3 != 0 and x % 5 != 0 x % 2 == 0 and x % 3 != 0 x % 2 == 0 x % 2 x 2 0 x % 3 != 0 x % 3 x 3 0 x % 5 != 0 x % 5 x 5 0 if x % 2 == 0 and x % 3 != 0 and x % 5 != 0 x B = [x for x in A if x % 2 == 0 and x % 3 != 0 and x % 5 != 0] B [x for x in A if x % 2 == 0 and x % 3 != 0 and x % 5 != 0] if len(B) > 0:
    print('DENIED')
else:
    print('APPROVED') len(B) > 0 len(B) len B 0 print('DENIED') print 'DENIED' print('APPROVED') print 'APPROVED' A = list(map(int, input().split())) list(map(int, input().split())) A B = [x for x in A if x % 2 == 0 and x % 3 != 0 and x % 5 != 0] [x for x in A if x % 2 == 0 and x % 3 != 0 and x % 5 != 0] B N = int(input()) int(input()) N
N = int(input())
A = list(map(int, input().split()))
B = [x for x in A if x % 2 == 0 and x % 3 != 0 and x % 5 != 0]
if len(B) > 0:
    print('DENIED')
else:
    print('APPROVED')