n = int(input())
list01 = input().split()
x = 0
for i in list01:
    if int(i) % 2 != 0:
        pass
    elif int(i) % 3 == 0:
        pass
    elif int(i) % 5 == 0:
        pass
    else:
        x += 1
        break

if x == 1:
    print('DENIED')
else:
    print('APPROVED') n = int(input()) n int(input()) int input() input list01 = input().split() list01 input().split() ().split () input split x = 0 x 0 for i in list01:
    if int(i) % 2 != 0:
        pass
    elif int(i) % 3 == 0:
        pass
    elif int(i) % 5 == 0:
        pass
    else:
        x += 1
        break i list01 if int(i) % 2 != 0:
        pass
    elif int(i) % 3 == 0:
        pass
    elif int(i) % 5 == 0:
        pass
    else:
        x += 1
        break int(i) % 2 != 0 int(i) % 2 int(i) int i 2 0 elif int(i) % 3 == 0:
        pass
     int(i) % 3 == 0 int(i) % 3 int(i) int i 3 0 elif int(i) % 5 == 0:
        pass
     int(i) % 5 == 0 int(i) % 5 int(i) int i 5 0 x += 1 x 1 break if x == 1:
    print('DENIED')
else:
    print('APPROVED') x == 1 x 1 print('DENIED') print 'DENIED' print('APPROVED') print 'APPROVED' list01 = input().split() input().split() list01 n = int(input()) int(input()) n x += 1 1 x x = 0 0 x
n = int(input())
list01 = input().split()
x = 0
for i in list01:
    if int(i) % 2 != 0:
        pass
    elif int(i) % 3 == 0:
        pass
    elif int(i) % 5 == 0:
        pass
    else:
        x += 1
        break

if x == 1:
    print('DENIED')
else:
    print('APPROVED')