N = int(input())
nums = map(int, input().split(" "))

for n in nums:
    if n % 2 != 0:
        continue

    if n % 3 == 0 or n % 5 == 0:
        continue
    else:
        print("DENIED")
        exit(0)

print("APPROVED") N = int(input()) N int(input()) int input() input nums = map(int, input().split(" ")) nums map(int, input().split(" ")) map int input().split(" ") ().split () input split " " for n in nums:
    if n % 2 != 0:
        continue

    if n % 3 == 0 or n % 5 == 0:
        continue
    else:
        print("DENIED")
        exit(0) n nums if n % 2 != 0:
        continue

     n % 2 != 0 n % 2 n 2 0 continue if n % 3 == 0 or n % 5 == 0:
        continue
    else:
        print("DENIED")
        exit(0) n % 3 == 0 or n % 5 == 0 n % 3 == 0 n % 3 n 3 0 n % 5 == 0 n % 5 n 5 0 continue print("DENIED") print "DENIED" exit(0) exit 0 print("APPROVED") print "APPROVED" nums = map(int, input().split(" ")) map(int, input().split(" ")) nums N = int(input()) int(input()) N
N = int(input())
nums = map(int, input().split(" "))

for n in nums:
    if n % 2 != 0:
        continue

    if n % 3 == 0 or n % 5 == 0:
        continue
    else:
        print("DENIED")
        exit(0)

print("APPROVED")