import sys
N = int(input())
array = list(map(int,input().split()))

if not ( 1 <= N <= 100 ): sys.exit()
if not ( 1 <= min(array) and max(array) <= 1000 ): sys.exit()

for I in array:
    if I % 2 == 0 and not ( I % 3 == 0 or I % 5 == 0 ):
        print('DENIED')
        sys.exit()
print('APPROVED') import sys sys N = int(input()) N int(input()) int input() input array = list(map(int,input().split())) array list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split if not ( 1 <= N <= 100 ): sys.exit() not ( 1 <= N <= 100 ) 1 <= N <= 100 1 <= N 1 N 100 if not ( 1 <= min(array) and max(array) <= 1000 ): sys.exit() not ( 1 <= min(array) and max(array) <= 1000 ) 1 <= min(array) and max(array) <= 1000 1 <= min(array) 1 min(array) min array max(array) <= 1000 max(array) max array 1000 for I in array:
    if I % 2 == 0 and not ( I % 3 == 0 or I % 5 == 0 ):
        print('DENIED')
        sys.exit() I array if I % 2 == 0 and not ( I % 3 == 0 or I % 5 == 0 ):
        print('DENIED')
        sys.exit() I % 2 == 0 and not ( I % 3 == 0 or I % 5 == 0 ) I % 2 == 0 I % 2 I 2 0 not ( I % 3 == 0 or I % 5 == 0 ) I % 3 == 0 or I % 5 == 0 I % 3 == 0 I % 3 I 3 0 I % 5 == 0 I % 5 I 5 0 print('DENIED') print 'DENIED' sys.exit() sys.exit sys exit print('APPROVED') print 'APPROVED' array = list(map(int,input().split())) list(map(int,input().split())) array N = int(input()) int(input()) N
import sys
N = int(input())
array = list(map(int,input().split()))

if not ( 1 <= N <= 100 ): sys.exit()
if not ( 1 <= min(array) and max(array) <= 1000 ): sys.exit()

for I in array:
    if I % 2 == 0 and not ( I % 3 == 0 or I % 5 == 0 ):
        print('DENIED')
        sys.exit()
print('APPROVED')