import sys

S = int(next(sys.stdin))
A = map(int, next(sys.stdin).strip().split())
even_numbers = filter(lambda y: not y % 2, A)
print('APPROVED' if all(not v % 3 or not v % 5 for v in even_numbers) else 'DENIED') import sys sys S = int(next(sys.stdin)) S int(next(sys.stdin)) int next(sys.stdin) next sys.stdin sys stdin A = map(int, next(sys.stdin).strip().split()) A map(int, next(sys.stdin).strip().split()) map int next(sys.stdin).strip().split() (sys.stdin).strip().split (sys.stdin).strip() (sys.stdin).strip (sys.stdin) next sys.stdin sys stdin strip split even_numbers = filter(lambda y: not y % 2, A) even_numbers filter(lambda y: not y % 2, A) filter lambda y: not y % 2 not y % 2 y % 2 y 2 y A print('APPROVED' if all(not v % 3 or not v % 5 for v in even_numbers) else 'DENIED') print 'APPROVED' if all(not v % 3 or not v % 5 for v in even_numbers) else 'DENIED' all(not v % 3 or not v % 5 for v in even_numbers) all not v % 3 or not v % 5 not v % 3 v % 3 v 3 not v % 5 v % 5 v 5 'APPROVED' 'DENIED' S = int(next(sys.stdin)) int(next(sys.stdin)) S even_numbers = filter(lambda y: not y % 2, A) filter(lambda y: not y % 2, A) even_numbers A = map(int, next(sys.stdin).strip().split()) map(int, next(sys.stdin).strip().split()) A
import sys

S = int(next(sys.stdin))
A = map(int, next(sys.stdin).strip().split())
even_numbers = filter(lambda y: not y % 2, A)
print('APPROVED' if all(not v % 3 or not v % 5 for v in even_numbers) else 'DENIED')