n = int(input())
a = list(map(int, input().split()))
res = 'APPROVED'
for x in a:
    if x % 2 == 0 and x % 3 != 0 and x % 5 != 0:
        res = 'DENIED'
print(res) 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 res = 'APPROVED' res 'APPROVED' for x in a:
    if x % 2 == 0 and x % 3 != 0 and x % 5 != 0:
        res = 'DENIED' x a if x % 2 == 0 and x % 3 != 0 and x % 5 != 0:
        res = 'DENIED' 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 res = 'DENIED' res 'DENIED' print(res) print res a = list(map(int, input().split())) list(map(int, input().split())) a n = int(input()) int(input()) n res = 'DENIED' 'DENIED' res res = 'APPROVED' 'APPROVED' res
n = int(input())
a = list(map(int, input().split()))
res = 'APPROVED'
for x in a:
    if x % 2 == 0 and x % 3 != 0 and x % 5 != 0:
        res = 'DENIED'
print(res)