# 与えられた数値の桁数と桁値の総和を計算する.
def calc_digit_sum(num):
    digits = sums = 0
    while num > 0:
        digits += 1
        sums += num % 10
        num //= 10
    return digits, sums


n = int(input())
arr = map(int, input().split())

candidate = [n for n in arr if n % 2 == 0]
for check in candidate:
    if check % 3 != 0 and check % 5 != 0:
        print("DENIED")
        exit()

print("APPROVED") def calc_digit_sum(num):
    digits = sums = 0
    while num > 0:
        digits += 1
        sums += num % 10
        num //= 10
    return digits, sums calc_digit_sum digits = sums = 0 digits 0 = sums = 0 sums 0 while num > 0:
        digits += 1
        sums += num % 10
        num //= 10
     num > 0 num 0 digits += 1 digits 1 sums += num % 10 sums num % 10 num 10 num //= 10 num 10 return digits, sums return digits, sums digits sums num num n = int(input()) n int(input()) int input() input arr = map(int, input().split()) arr map(int, input().split()) map int input().split() ().split () input split n for n in arr if n % 2 == 0 for n in arr if n % 2 == 0 n arr n % 2 == 0 n % 2 n 2 0 if n % 2 == 0 n candidate = [n for n in arr if n % 2 == 0] candidate [n for n in arr if n % 2 == 0] for check in candidate:
    if check % 3 != 0 and check % 5 != 0:
        print("DENIED")
        exit() check candidate 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" candidate = [n for n in arr if n % 2 == 0] [n for n in arr if n % 2 == 0] candidate def calc_digit_sum(num):
    digits = sums = 0
    while num > 0:
        digits += 1
        sums += num % 10
        num //= 10
    return digits, sums def calc_digit_sum(num):
    digits = sums = 0
    while num > 0:
        digits += 1
        sums += num % 10
        num //= 10
    return digits, sums calc_digit_sum arr = map(int, input().split()) map(int, input().split()) arr n = int(input()) int(input()) n
# 与えられた数値の桁数と桁値の総和を計算する.
def calc_digit_sum(num):
    digits = sums = 0
    while num > 0:
        digits += 1
        sums += num % 10
        num //= 10
    return digits, sums


n = int(input())
arr = map(int, input().split())

candidate = [n for n in arr if n % 2 == 0]
for check in candidate:
    if check % 3 != 0 and check % 5 != 0:
        print("DENIED")
        exit()

print("APPROVED")
