N = int(input())
a = map(int, input().split())

even = [i for i in a if i % 2 == 0]
for check in even:
  if check % 3 != 0 and check % 5 != 0:
    print('DENIED')
    exit()
print('APPROVED') N = int(input()) N int(input()) int input() input a = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split i for i in a if i % 2 == 0 for i in a if i % 2 == 0 i a i % 2 == 0 i % 2 i 2 0 if i % 2 == 0 i even = [i for i in a if i % 2 == 0] even [i for i in a if i % 2 == 0] for check in even:
  if check % 3 != 0 and check % 5 != 0:
    print('DENIED')
    exit() check even if check % 3 != 0 and check % 5 != 0:
    print('DENIED')
    exit() check % 3 != 0 and check % 5 != 0 check % 3 != 0 check % 3 check 3 0 check % 5 != 0 check % 5 check 5 0 print('DENIED') print 'DENIED' exit() exit print('APPROVED') print 'APPROVED' a = map(int, input().split()) map(int, input().split()) a N = int(input()) int(input()) N even = [i for i in a if i % 2 == 0] [i for i in a if i % 2 == 0] even
N = int(input())
a = map(int, input().split())

even = [i for i in a if i % 2 == 0]
for check in even:
  if check % 3 != 0 and check % 5 != 0:
    print('DENIED')
    exit()
print('APPROVED')