ri = lambda S: [int(v) for v in S.split()]
def rii(): return ri(input())

N = int(input())
A = [v for v in rii() if v % 2 == 0]

print("APPROVED" if all(v % 3 == 0 or v % 5 == 0 for v in A) else "DENIED") int(v) for v in S.split() for v in S.split() v S.split() S.split S split for v in S.split() int(v) int v ri = lambda S: [int(v) for v in S.split()] ri lambda S: [int(v) for v in S.split()] [int(v) for v in S.split()] S def rii(): return ri(input()) rii N = int(input()) N int(input()) int input() input v for v in rii() if v % 2 == 0 for v in rii() if v % 2 == 0 v rii() rii v % 2 == 0 v % 2 v 2 0 if v % 2 == 0 v A = [v for v in rii() if v % 2 == 0] A [v for v in rii() if v % 2 == 0] print("APPROVED" if all(v % 3 == 0 or v % 5 == 0 for v in A) else "DENIED") print "APPROVED" if all(v % 3 == 0 or v % 5 == 0 for v in A) else "DENIED" all(v % 3 == 0 or v % 5 == 0 for v in A) all v % 3 == 0 or v % 5 == 0 v % 3 == 0 v % 3 v 3 0 v % 5 == 0 v % 5 v 5 0 "APPROVED" "DENIED" N = int(input()) int(input()) N A = [v for v in rii() if v % 2 == 0] [v for v in rii() if v % 2 == 0] A def rii(): return ri(input()) def rii(): return ri(input()) rii ri = lambda S: [int(v) for v in S.split()] lambda S: [int(v) for v in S.split()] ri
ri = lambda S: [int(v) for v in S.split()]
def rii(): return ri(input())

N = int(input())
A = [v for v in rii() if v % 2 == 0]

print("APPROVED" if all(v % 3 == 0 or v % 5 == 0 for v in A) else "DENIED")