N = int(input())

an = list(map(int,input().split()))

boolian = True

for i in range(N):
    if an[i] % 2 == 0:
        if an[i] % 3 ==0 or an[i] % 5 ==0:
            boolian = True
        else:
            boolian = False
            break
if boolian == False:
    print('DENIED')
    
if boolian == True:
    print('APPROVED') N = int(input()) N int(input()) int input() input an = list(map(int,input().split())) an list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split boolian = True boolian True for i in range(N):
    if an[i] % 2 == 0:
        if an[i] % 3 ==0 or an[i] % 5 ==0:
            boolian = True
        else:
            boolian = False
            break i range(N) range N if an[i] % 2 == 0:
        if an[i] % 3 ==0 or an[i] % 5 ==0:
            boolian = True
        else:
            boolian = False
            break an[i] % 2 == 0 an[i] % 2 an[i] an i 2 0 if an[i] % 3 ==0 or an[i] % 5 ==0:
            boolian = True
        else:
            boolian = False
            break an[i] % 3 ==0 or an[i] % 5 ==0 an[i] % 3 ==0 an[i] % 3 an[i] an i 3 0 an[i] % 5 ==0 an[i] % 5 an[i] an i 5 0 boolian = True boolian True boolian = False boolian False break if boolian == False:
    print('DENIED')
     boolian == False boolian False print('DENIED') print 'DENIED' if boolian == True:
    print('APPROVED') boolian == True boolian True print('APPROVED') print 'APPROVED' boolian = False False boolian N = int(input()) int(input()) N boolian = True True boolian an = list(map(int,input().split())) list(map(int,input().split())) an boolian = True True boolian
N = int(input())

an = list(map(int,input().split()))

boolian = True

for i in range(N):
    if an[i] % 2 == 0:
        if an[i] % 3 ==0 or an[i] % 5 ==0:
            boolian = True
        else:
            boolian = False
            break
if boolian == False:
    print('DENIED')
    
if boolian == True:
    print('APPROVED')