def main():

  n = int(eval(input()))

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



  r = 'APPROVED'



  for num in a:

    if num % 2 == 0:

      if num % 3 == 0 or num % 5 == 0:

        pass

      else:

        r = 'DENIED'

        break

  print(r)

  

main()
import sys

read = sys.stdin.read

readlines = sys.stdin.readlines

import numpy as np

def main():

    a = np.fromstring(read(), np.int64, sep=' ')[1:]

    a = a[a % 2 == 0]

    if np.all((a % 3 == 0) | (a % 5 == 0)):

        print('APPROVED')

    else:

        print('DENIED')



if __name__ == '__main__':

    main()

def main():
    n = int(eval(input()))
    a = list(map(int, input().split()))
    r = "APPROVED"
    for num in a:
        if num % 2 == 0:
            if num % 3 == 0 or num % 5 == 0:
                pass
            else:
                r = "DENIED"
                break
    print(r)


main()

import sys

read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np


def main():
    a = np.fromstring(read(), np.int64, sep=" ")[1:]
    a = a[a % 2 == 0]
    if np.all((a % 3 == 0) | (a % 5 == 0)):
        print("APPROVED")
    else:
        print("DENIED")


if __name__ == "__main__":
    main()

-def main(): -    n = int(eval(input())) -    a = list(map(int, input().split())) -    r = "APPROVED" -    for num in a: -        if num % 2 == 0: -            if num % 3 == 0 or num % 5 == 0: -                pass -            else: -                r = "DENIED" -                break -    print(r) +import sys + +read = sys.stdin.read +readlines = sys.stdin.readlines +import numpy as np -main() +def main(): +    a = np.fromstring(read(), np.int64, sep=" ")[1:] +    a = a[a % 2 == 0] +    if np.all((a % 3 == 0) | (a % 5 == 0)): +        print("APPROVED") +    else: +        print("DENIED") + + +if __name__ == "__main__": +    main()