import sys
N = int(input())
lsA = list(map(int,input().split()))
for i in range(N):
    if lsA[i] % 2 == 0:
        if lsA[i] % 3 == 0 or lsA[i] % 5 == 0:
            continue
        else:
            print('DENIED')
            sys.exit()
print('APPROVED') import sys sys N = int(input()) N int(input()) int input() input lsA = list(map(int,input().split())) lsA list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in range(N):
    if lsA[i] % 2 == 0:
        if lsA[i] % 3 == 0 or lsA[i] % 5 == 0:
            continue
        else:
            print('DENIED')
            sys.exit() i range(N) range N if lsA[i] % 2 == 0:
        if lsA[i] % 3 == 0 or lsA[i] % 5 == 0:
            continue
        else:
            print('DENIED')
            sys.exit() lsA[i] % 2 == 0 lsA[i] % 2 lsA[i] lsA i 2 0 if lsA[i] % 3 == 0 or lsA[i] % 5 == 0:
            continue
        else:
            print('DENIED')
            sys.exit() lsA[i] % 3 == 0 or lsA[i] % 5 == 0 lsA[i] % 3 == 0 lsA[i] % 3 lsA[i] lsA i 3 0 lsA[i] % 5 == 0 lsA[i] % 5 lsA[i] lsA i 5 0 continue print('DENIED') print 'DENIED' sys.exit() sys.exit sys exit print('APPROVED') print 'APPROVED' lsA = list(map(int,input().split())) list(map(int,input().split())) lsA N = int(input()) int(input()) N
import sys
N = int(input())
lsA = list(map(int,input().split()))
for i in range(N):
    if lsA[i] % 2 == 0:
        if lsA[i] % 3 == 0 or lsA[i] % 5 == 0:
            continue
        else:
            print('DENIED')
            sys.exit()
print('APPROVED')