import numpy as np
stdin = open(0)

A = np.fromstring(stdin.read(), np.int64, sep=' ')[1:]
A = A[A % 2 == 0]
if np.all((A % 3 == 0) | (A % 5 == 0)):
    print('APPROVED')
else:
    print('DENIED') import numpy as np numpy stdin = open(0) stdin open(0) open 0 A = np.fromstring(stdin.read(), np.int64, sep=' ')[1:] A np.fromstring(stdin.read(), np.int64, sep=' ')[1:] np.fromstring(stdin.read(), np.int64, sep=' ') np.fromstring np fromstring stdin.read() stdin.read stdin read np.int64 np int64 sep=' ' sep ' ' 1: 1 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)):
    print('APPROVED')
else:
    print('DENIED') 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 print('APPROVED') print 'APPROVED' print('DENIED') print 'DENIED' A = np.fromstring(stdin.read(), np.int64, sep=' ')[1:] np.fromstring(stdin.read(), np.int64, sep=' ')[1:] A stdin = open(0) open(0) stdin A = A[A % 2 == 0] A[A % 2 == 0] A
import numpy as np
stdin = open(0)

A = np.fromstring(stdin.read(), np.int64, sep=' ')[1:]
A = A[A % 2 == 0]
if np.all((A % 3 == 0) | (A % 5 == 0)):
    print('APPROVED')
else:
    print('DENIED')