import numpy as np

N=int(input())
A=np.array(list(map(int,input().split())))

A = A[A%2==0]
if (np.all((A%3==0) | (A%5==0))==True):
    print('APPROVED')
else:
    print('DENIED') import numpy as np numpy N=int(input()) N int(input()) int input() input A=np.array(list(map(int,input().split()))) A np.array(list(map(int,input().split()))) np.array np array list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split A = A[A%2==0] A A[A%2==0] A A%2==0 A%2 A 2 0 if (np.all((A%3==0) | (A%5==0))==True):
    print('APPROVED')
else:
    print('DENIED') np.all((A%3==0) | (A%5==0))==True np.all((A%3==0) | (A%5==0)) np.all np all (A%3==0) | (A%5==0) A%3==0 A%3 A 3 0 A%5==0 A%5 A 5 0 True print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' N=int(input()) int(input()) N A=np.array(list(map(int,input().split()))) np.array(list(map(int,input().split()))) A A = A[A%2==0] A[A%2==0] A
import numpy as np

N=int(input())
A=np.array(list(map(int,input().split())))

A = A[A%2==0]
if (np.all((A%3==0) | (A%5==0))==True):
    print('APPROVED')
else:
    print('DENIED')