N = int(input().rstrip())
l = [int(v) for v in input().rstrip().split()]
r = 'APPROVED'
for v in l:
    if v % 2 == 1:
        continue

    if v % 3 == 0 or v % 5 == 0:
        pass
    else:
        r = 'DENIED'
        break#
        
print(r)
 N = int(input().rstrip()) N int(input().rstrip()) int input().rstrip() ().rstrip () input rstrip int(v) for v in input().rstrip().split() for v in input().rstrip().split() v input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split for v in input().rstrip().split() int(v) int v l = [int(v) for v in input().rstrip().split()] l [int(v) for v in input().rstrip().split()] r = 'APPROVED' r 'APPROVED' for v in l:
    if v % 2 == 1:
        continue

    if v % 3 == 0 or v % 5 == 0:
        pass
    else:
        r = 'DENIED'
        break#
         v l if v % 2 == 1:
        continue

     v % 2 == 1 v % 2 v 2 1 continue if v % 3 == 0 or v % 5 == 0:
        pass
    else:
        r = 'DENIED'
        break#
         v % 3 == 0 or v % 5 == 0 v % 3 == 0 v % 3 v 3 0 v % 5 == 0 v % 5 v 5 0 r = 'DENIED' r 'DENIED' break print(r) print r r = 'APPROVED' 'APPROVED' r N = int(input().rstrip()) int(input().rstrip()) N r = 'DENIED' 'DENIED' r l = [int(v) for v in input().rstrip().split()] [int(v) for v in input().rstrip().split()] l
N = int(input().rstrip())
l = [int(v) for v in input().rstrip().split()]
r = 'APPROVED'
for v in l:
    if v % 2 == 1:
        continue

    if v % 3 == 0 or v % 5 == 0:
        pass
    else:
        r = 'DENIED'
        break#
        
print(r)

