peterverebics/CodeNet_Python_118 huggingface dataset:
a, b, c = map(int,input().split())

if a == b or a == c or b == c:
  print("Yes")
else:
  print("No")
array = [int(i) for i in input().split()]

if all(map(lambda i: i == array[0], array)) or all(map(lambda i: i != array[0], array[1:])):
    print("No")
else:
    print("Yes")
A=list(map(int,input().split()))
a=A[0]-A[1]
b=A[2]-A[1]
if a==0 or b==0 or a==b or a+b==0:
    print("Yes")
else:
    print("No")
A,B,C=input().split()

print(A)
print(B)
print(C)

if A==B:
    if B==C:
        print("No")
    else:
        print("Yes")
elif B==C:
    print("Yes")
elif A==C:
    print("Yes")
else:
    print("No")
a,b,c = map(int, input().split())

if a==b and a!=c:
  print('Yes')
elif b==c and b!=a:
  print('Yes')
else:
  print('No')
a=list(map(int,input().split()))
if (a[0]==a[1] & a[0]!=a[2])|(a[1]==a[2] & a[1]!=a[0])|(a[2]==a[0]&a[2]!=a[1]):
  print("Yes")
else:
  print("No")
A, B, C = map(int, input().split())

if (A == B and B == C) or (A != B and B != C and A != C):
    print("NO")
else:
    print("YES")
#########行列読み込み ##############################################
"""
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip().split() for _ in range(n)]
print(data)
print(*data, sep='\n')
"""
##################################################################
#########入力系####################################################
"""
s =input()
s=list(input())
a=int(input())
x,y = map(int,input().split())	
li = input().split()	
li = list(map(int,input().split()))	
li = input().split('T')	
"""
##################################################################
x,y,z = map(int,input().split())	

if (x==y and y==z) or (x!=y and y!=z) :
    print("No")
else:
    print("Yes")
from sys import stdin 
input = stdin.readline
A,B,C=map(int,input().split())
if A != B:
  if  B==C:
      print("Yes")
  else:
    print("No")
elif B != C:
  if A==B:
    print("Yes")
  else:
    print("No")
elif C != A:
  if A==B:
    print("Yes")
  else:
    print("No")
else:
  print("No")
A,B,C=input().split()
print('Yes' if A==B==C else 'NO')
a,b,c=map(int,input().split())
if a==b:
  if a==c:
    print("No")
  else:
    print("Yes")
else:
  if a==c:
    print("Yes")
  else:
    print("No")
def main():
    A, B, C = map(int, input().split())
    if A == B:
        if B==C:
            print("No")
        else:
            print('Yes')
    else:
        if B!=C:
            print('No')
        else :
            print("Yes")
main()
A, B, C = map(int, input().split())
if A == B and B == C:
    print('Yes')
else:
    print('No')
A,B,C=map(int,input().split())
if A==B or B==C or C==A:
  print("Yes")
elif A==B and B==C:
  print("No")
else:
  print("No")
a,b,c = map(int, input().split())
if a==b:
    if a!=c:
        print("Yes")
    else:
        print("No")
elif a!=b:
    if a==c:
        print("Yes")
    else:
        if b==c:
            print("Yes")
        else:
            print("NO")
A,B,C = map(int,input().split())
S = 'NO'

if A == B and A != C and B != C :
	S = 'YES'
elif A != B and (A == C or B == C) :
	S = 'YES'

print(S)
l = sorted([int(v) for v in input().rstrip().split()])
r = 'Yes' if l[0] != l[2] else 'No'
print(r)
A,B,C= map(int,input().split())

if A ==B == C :
    print("No")
else:
    print("Yes")
def solve():
    A, B, C = list(input().split())
    if A == B == C:
        print("No")
        exit()
    if A != B != C:
        print("No")
    else:
        print("Yes")


if __name__ == '__main__':
    solve()
n = list(map(int,input().strip().split()))
if n[0]==n[1] and n[1]==n[2]:
  print("No")
elif n[0]==n[1] and n[1]!=n[2]:
  print("Yes")
elif n[0]==n[2] and n[1]!=n[0]:
  print("Yes")
else:
  print('No')
n = list(map(int, input().split()))
if n[0] == n[1]:
    if n[0] == n[2]:
        print("No")
print("Yes")
A,B,C=input().split()

A=str(A);B=str(B);C=str(C);

if A == B and A == C:
  print('No')
elif B == A and B == C:
  print('No')
elif C == A and C == B:
  print('No')
else:
  print('Yes')
from sys import stdin

a, b, c = stdin.readline().rstrip().split()

if a == b == c:
    print("No")
else:
    print("Yes")
A = input().split()

if (int(A[0]) == int(A[1])) and (int(A[1]) == int(A[2])):
  print("No")
else:
  print("Yes")
A,B,C = map(int,input().split())
if A==B or A==C or B==C:
  print("Yes")
else:
  print("No")
def main():
    A, B, C = input().split()
    if A == B and B == C:
        print("No")
    else:
        print("Yes")

if __name__ == "__main__":
    main()
a,b,c = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
result = 'Yes'
if a == b and b ==c:
   result = 'No'
print(result)
# -*- coding: utf-8 -*-

#入力
a, b, c = map(int, input().split())

if a == b and b == c and c == a:
    print('NO')

elif a != b and b != c and c != a:
    print('NO')
else:
    print('YES')
a=list(map(int,input().split()))
print(a)
if a[0]==a[1]==a[2] or a[0]!=a[1]!=a[2]:
  print("No")
else:
  print("Yes")
A, B, C= map(int, input().split())
count = 0 
    
if A==B and A!=C and C!=B:
    print('Yes')
if A==C and A!=B and C!=B:
    print('Yes')
if C==B and A!=C and A!=B:
    print('Yes')
if A==B and B==C:
    print('No')
if A!=B and B!=C:
    print('No')
A,B,C=map(int,input().split())

if A==B==C:
	print("No")
elif A!=B!=C:
	print("No")
else:
	print("Yes")
a,b,c=map(int,input().split())
if a==b!=c:
    print("Yes")
elif a!=b==c:
    print("Yes")
elif a==c!=b:
    print("Yes")
else:
    print("no")
a, b, c = map(int, input().split())

if a == b and b == c and c == a:
    print('No')
else:
    print('Yes')
a, b , c = map(int, input().split())
if a == b or a == c or b == c:
    print('Yes')
else:
    print('No')
a,b,c=map(int,input().split())
if (a==b or b==c or c==1)and not a==b==c:
    print("Yes")
else:
    print("No")
A,B,C=map(int,input().split())


if A==B==C:
    print("No")
else:
    print("Yes")
A,B,C=map(int,input().split())

if A==B or A==C or B==C:
    if A==B and A==C:
        print('NO')
    else :
        print('Yes')
else:
    print('No')
x = list(map(int,input().split()))

x = set(x)
if len(x)<3:
    print("Yes")
else:
    print("No")
a,b,c = map(int,input().split())
count=0
if(a==b):
    count+=1
if(b==c):
    count+=1
if(c==a):
    count+=1

if(count==1):
    print('YES')
else:
    print('NO')
a = list(map(int, input().split()))

if min(a) == max(a):
  print('No')
else:
  print('Yes')
X,Y,Z = map(int,input().split())
if(X == Y):
    if(Y != Z):
        print("Yes")
    else:
        print("No")
elif(X == Z):
    if(X != Y):
        print("Yes")
    else:
        print("No")
else:
    print("No")
a, b, c = map(int, input().split());

if a == b and b == c:
  print("No");
elif a != b and b !=c:
  print("No");
else:
  print("Yes");
#3つの数字をリストにする
data = input().split( )
#場合わけ
if (data[0] == data[1] or data[1] == data[2] or
   data[2] ==data[0]) and data[1]!= data[2]!=data[0] :
    print("Yes")

else:
    print("No")
n = list(map(int, input().split()))
a = n[0]
for i in n[:1]:
  if a != i:
    print("Yes")
    exit()
  a = i
print("No")
X, Y, Z = input("Enter a three value: ").split() 
if (X == Y) or (X == Z) or (Y == Z):
  print("Yes")
else:
  print("NO")
a, b, c = map(int, input().split())
if a == b and b == c:
    print('No')
else:
    print('Yes')
def main():
    num = list(map(int,input().split()))
    if num.count(num[0]) == 2 or num.count(num[1]) == 2:
        print('YES')
        return

    print('NO')


main()
A, B, C = map(int, input().split())
if (A == B and A != C) or (A == C and A != B) or (B == C and B != C):
    print('Yes')
else:
    print('No')
a,b,c=map(int,input().split())

if a==b==c:
    print("No")
else:
    print("Yes")
A, B, C = list(map(int, input().split(' ')))
count = 0
if A == B:
    count += 1
if A == C:
    count += 1
if B == C:
    count += 1
if count == 2:
    print('Yes')
else:
    print('No')
LIST = sorted(input().split(),reverse=True)

flag = 0
if LIST[0] == LIST[1]:
    flag += 1
if LIST[1] == LIST[2]:
    flag += 1
if LIST[0] == LIST[2]:
    flag = 0

if flag == 1:
    print("YES")
else:
    print("NO")
S=set(map(int,input().split()))
print("No" if len(S)==3 else "Yes")
a, b, c = map(int, input().split())
if a == b or a == c or b == c:
  print("Yes")
else:
  print("No")
x = list(map(int,input().split()))
a = x[0]
b = x[1]
c = x[2]

if a==b or b==c or c==a or (a==b and b==c):
    print("Yes")
else:
    print("No")
data=list(map(int,input().split()))
data.sort()
print(data)
ans="No"
if data[0]==data[1]:
    if data[1]==data[2]:
        ans="No"
    else:
        ans='Yes'
elif data[1]==data[2]:
    ans="Yes"
print(ans)
l=list(map(int,input().split()))
l.sort()
x=l[1]
for i in range(3):
	l[i]-=x
if len(set(l))>1:
	print("Yes")
else:
	print("No")
def main():
 a,b,c = map(int,input().split())
 if a == b and a == c or a != b and a != c:
     print('No')
 else:
     print('Yes')
main()
def main():
    a, b, c = map(int, input().split())
    if (a == b and a == c) or (a != b and a != c):
        print('No')
    else:
        print('Yes')
main()
a,b,c = map(int, input().split())
i = 0
if a == b and b != c:
  i = 1
elif a != b and b == c:
  i = 1

print('Yes' if i else 'No')
A = input().split()

a = A.count(A[0])
b = A.count(A[1])
c = A.count(A[2])

if a == 1 or b == 1 or c == 1:
    print("Yes")
else:
    print("No")
A, B, C = map(int,input().split())
count = 0

if(A == B):
    count += 1
if(A == C):
    count += 1
if(count == 1):
    print('YES')
else:
    print("NO")
a,b,c=map(int,input().split())
if(a==b and b==c):
  print("Yes")
elif(a==b):
  print("No")
elif(b==c):
  print("No")
elif(c==a):
  print("No")
else:
  print("Yes")
list=[int(x) for x in input().split()]
count=0
for i in range(1,len(list)):
  if list[i-1]==list[i]:
    count=count+1
if count==1:
  print("Yes")
else:
  print("No")
a, b, c = map(int, input().split())
print(len(set([a, b, c])) > 2)
a, b, c = map(int, input().split())
if (a==b and a!=c) or (b==c and a!=b) or (a==c and a!=b):
  print("YES")
else:
  print("NO")
a = set(map(int,input().split()))

if len(a)==2:
  print('YES')
else:
  print('No')
a=input().strip().split()


if a[0]==a[1]==a[2] or a[0]!=a[1]!=a[2]:
  print('No')
else:
  print('Yes')
A,B,C = map(int,input().split())
if A==B:
    if B==C:
        print('No')
    else:
        print('Yes')
else:
    print('Yes')
hoge = input().split()
 
if hoge[0] == hoge[1]:
  if hoge[1] == hoge[2]:  #0=1=2=0
    print("No")
  else:
    if hoge[0] != hoge[2]: #0 != 1 =2 =0
      print("Yes")
    
else:
  if hoge[1] == hoge[2]:
    print("Yes")
  else:
    if hoge[0] != hoge[2]:
      print("No")
a,b,c = map(int,input().split())
k = [a, b, c]
if(len(set(k))==2):
    print("yes")
else:
    print("no")
a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)
if a==b and a!=c:
    print('yes')
elif a==c and a!=b:
    print('yes')
elif b==c and a!=b:
    print('yes')
else:
    print('no')
A, B, C = input().split()
if A[-1] == B[0] or B[-1] == C[0] or C[-1] == A[0] :
    print("Yes")
else :
    print("No")
A, B, C = map(int, input().split())

if((A != B and B != C) or (A == B and B == C)):
  print("No")
else:
  print("Yes")
a, b, c = map(int, input().split())

if a == b and b == c:
  print('Yes')
else:
  print('No')
a,b,c=map(int,input().split())

if a==b or b==c:
  if a!=b or b!=c or a!=c:
    print("Yes")
  else:
    print("No")
else:
  print("No")
x = input().split()
A = x[0]
B = x[1]
C = x[2]

if  int(A) == int(B) != int(C):
    print("yes")
elif int(B) == int(C) != int(A):
    print("yes")
elif int(C) == int(A) != int(B):
    print("yes")
else:
    print("No")
a,b,c = map(int,input().split())
if (a == b and b == c):
    print('No')
else:
    print('Yes')
A = map(int,input().split())
print("Yes" if len(set(A))==1 else "No" )
A, B, C = input().split()

if A == B and A == C:
  print('No')
elif A == B or A == C:
  print ('Yes')
else:
  print('No')
a, b, c = map(int, input().split())
if (a == b != c) or (a != b == c) or (a != b != c):
    print("Yes")
else:
    print("No")
a, b ,c = map(int, input().split())

if (a == b == c) or (a != b != c):
    print("No")
else:
    print("Yes")
A, B, C = input().split()

if A == B:
    if A != C:
        print('Yes')
elif A == C:
    if A != B:
        print('Yes')
elif B == C:
    if B != A:
        print('Yes')
else:
    print('No')
def solve(a, b, c):
    if (a == b and a != c) or (b == c and a != c) or (c == a and a != b):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    a, b, c = map(int, input().split())
myinput_H = input()
mylist = list(map(int, myinput_H.split(" ")))
A = mylist[0]
B = mylist[1]
C = mylist[2]
def check(a,b,c):
  if (a == b & b != c) or (a == c & b != c) or (b == c & b != a):
    print(Yes)
  else:
    print(No)
n = list(map(int, input().split()))
if n[0] == n[1] == n[2]:
    print("Yes")
print("No")
from collections import Counter

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

c = Counter(Poors)

if 1 in list(c.values()) and len(list(c.values()))==3:
    print('Yes')
else:
    print('No')
a = input().split()
x=a[0]
y=a[1]
z=a[2]
if x==y:
    if x==z:
        print("Yo")
    else:
        print("Yes")
else:
    if x==z:
        print("Yes")
    else:
        if y==z:
            print("Yes")
        else:
            print("No")
A = list(map(int, input().split()))
A = sorted(A)

if A[0] == A[1] and A[1] != A[2]:
    print("Yes")
else:
    print("No")
a, b, c = map(int, input().split())
print('No' if a != b != c or a == b == c else 'Yes')
A, B, C = map(int, input().split())
if A == B or B == C or C == A:
  print("Yes")
else:
  print("No")
a,b,c=(int(x) for x in input().split())
 
if a == b or a == c or b == c:
    if a == b == c:
        print("no")
    else:
        print("yes")
  
else:
  print("no")
A, B, C = map(int, input().split())

if A==B or A==C or B==C:
    if A==B and A==C:
        print("NO")
    else:
        print("YES")
else:
    print("NO")
l = input().split()
if (len(set(l)) == 3):
    print('No')
else:
    print('Yes')
#<ABC155>
#<A>
a,b,c=map(int,input().split())
if a==b or a==c or b==c:
    print("Yes")
else:
    print("No")
a, b, c = map(int,input().split())

if a == b and b == c and c == a:
  print("No")
elif a != b and b != c and c != a:
  print("No")
else:
  ("Yes")
A=list(map(int,input().split()))
if (A[0]==A[1]==A[2]) or (A[0]!=A[1]!=A[2]):
  print("NO")
N=int(input())
A_list=list(map(int,input().split()))

#print(N)
#print(A_list)

Flag = True
for i in range(N):
    if A_list[i] % 2 == 0:
        if A_list[i] % 3 == 0 or A_list[i] % 5 == 0:
            continue
        else:
            Flag = False
            break

if Flag:
    print('APPROVED')
else:
    print('DENIED')
N=int(input())
A = list(map(int,input().split()))
str="APPROVED"

for item in A:
  if item%2==0:
    if item%3!=0 and item%5 !=0:
      str = "DENIED"
      
print(str)
def main():
    n = int(input())
    *a, = map(int, input().split())

    bool_ = any(x for x in a if (x % 2 == 0) and not (x % 3 == 0 or x % 5 == 0))

    print('DENIED' if bool_ else 'APPROVED')


if __name__ == '__main__':
    main()
N = input()
As = input().split()
e = [int(i) for i in As if int(i)%2 == 0]
c = 0
for i in e:
  if i%3==0 or i%5==0:
    c += 1
if c == len(e):
  print("APPROVED")
else:
  print("DENIED")
input() #Nはすてる
A = list(map(lambda x: int(x), input().split()))
denied = False
for a in A:
  if a%2==0:
    if a%3!=0 and a%5!=0:
      print('DENIED')
      denied = True
      break
if denied==False:
  print('APPROVED')
N = int(input())
A = list(map(int, input().split()))
B = []

for item in A:
    if item%2==0:
        B.append(item)
cnt = 0
ans = ''
for item in B:
    if item%3!=0:
        if item%5!=0:
            ans = 'DENIED'
if ans!='DENIED':
    ans = 'APPROVED'
print(ans)
N=int(input())
A=list(map(int,input().split()))
a=[]
b=[]
for i in A:
    if i%2==0:
        a.append(i)
for n in a:
    if n%3==0 or n%5==0:
        b.append(n)
if len(a)==len(b):
    print('APPROVED')
else:
    print('DENIED')
N = int(input())
A = list(map(int, input().split()))

for a in A:
  if a % 2 == 0:
    if a % 3 != 0 and a % 5 != 0:
      print("DENIED")
      exit()
print("APPROVED")
n = int(input())
a = list(map(int, input().split()))

for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            continue
        else:
            print('DENIED')
            exit(0)
print('APPROVED')
n=int(input())
a = list(map(int, input().split()))
for i in a:
    if i%2==0 and i%3 and i%5:
        print('DENIED')
        exit()
else:
    print('APPROVED')
n = int(input())
a = list(map(int,input().split()))
ans = True
for i in a:
  if i % 2 == 0:
    if not (i % 3 == 0 or i % 5 == 0):
      ans = False
      break
if ans:
  print('APPROVED')
else:
  print('DENIED')
N = int(input())
A = list(map(int,input().split()))
flag = 1
for num in A:
    if num % 2== 0:
        if num % 3 ==0 or num % 5 ==0:
            continue
        else:
            flag =0

if flag == 1:
    print("APPROVED")
else:
    print("DENIED")
N = int(input())
A = list(map(int, input().split()))

for i in range(len(A)):
    if A[i]%2 == 0:
        if A[i]%3 != 0 and  A[i]%5 != 0:
            print("DENIED")
            exit(0)

print("APPROVED")
n=int(input())
a=list(map(int,input().split()))
s=[i for i in a if i%2==0]
t=[i for i in s if i%3>0 and i%5>0]
print('APPROVED' if len(t)==0 else 'DENIED')
N=int(input())
W = [int(x) for x in input().split()]
for i in W:
    if i%2==0:
        if i%10==0 or i%6==0:
            pass
        else:
            print("DENIED")
            exit()
print("APPROVED")
N, = list(map(int, input().split()))
A = list(map(int, input().split()))

if all(x % 3 == 0 or x % 5 == 0 for x in A if x % 2 == 0):
    print('APPROVED')
else:
    print('DENIED')
N = int(input())
A = list(map(int, input().split()))
n = 0
for i in range(N):
    if A[i]%2 == 0:
        if A[i]%3 != 0 and A[i]%5 != 0:
            n = 1

if n == 0:
    print('APPROVED')
elif n == 1:
    print('DENIED')
n = int(input())
aa = list(map(int, input().split(' ')))

result = 'APPROVED'
for a in aa:
    if a % 2 == 0:
        if a % 3 != 0 and a % 5 != 0:
            result = 'DENIED'
            break
print(result)
n=int(input())
flag=0

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

for i in range(n):
	if(a[i]%2==0):
		if(a[i]%3!=0 and a[i]%5!=0):
			flag=1

if(flag==1):
	print("DENIED")
else:
	print("APPROVED")
N = int(input())
A = list(map(int, input().split()))

for i in A:
  if i%2 == 0 and i%3 != 0 and i%5 != 0:
    print('DENIED')
    exit()
print('APPROVED')
N = int(input())
A = list(map(int,input().split()))

for i in range(len(A)):
  if A[i]%2 == 0 and (A[i]%3!=0 and A[i]%5!=0):
    print("DENIED")
    exit()
print("APPROVED")
n = int(input())
a = map(int,input().split())
ans = "APPROVED"
for x in a:
  if x%2 == 0:
    if x%3 != 0 and x%5 != 0:
	    ans = "DENIED"
print(ans)
N = int(input())
doc = [int(x) for x in input().split() if int(x) % 2 == 0]
for i in doc:
  if i % 3 != 0 and i % 5 != 0:
    print('DENIED')
    exit()
print('APPROVED')
import itertools
import functools
import math
from collections import Counter
from itertools import combinations
import re


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

flg = 0
for i in range(N):
    if A[i] % 2 == 0:
        if not ( A[i] % 3 == 0 or A[i] % 5 == 0 ):
            flg = 1
            break

if flg == 1:
    print('DENIED')
else:
    print('APPROVED')
n = int(input())
a = list(map(int,input().split()))
for b in a:
    if b%2 == 0:
        if b%3 == 0 or b%5 == 0:
            continue
        else:
            print('DENIED')
            exit()
else:
    print('APPROVED')
N = int(input())
A = list(map(int, input().split()))

if all(a%3==0 or a%5==0 for a in A if a%2==0):
    print('APPROVED')
else:
    print('DENIED')
n = input()
a = list(map(int, input().split()))
ans = True
for x in a:
    if x % 2 == 0:
        if not(x % 3 == 0 or x % 5 == 0):
            ans = False
            break
print('APPROVED') if ans else print('DENIED')
n = int(input())

a = []
for x in input().split():
    a.append(int(x))
    
is_approved = True

for i in a:
    if i % 2 ==0:
        if (i % 3 !=0) and (i % 5 !=0):
            is_approved = False
            
if is_approved:
    print('APPROVED')
else:
    print('DENIED')
N=int(input())
A=list(map(int, input().split())) 
tmp=[]
ans=True
for i in A:
  if i%2==0:
    tmp.append(i)
  else:
    continue

for i in tmp:
  if i%3==0 or i%5==0:
    continue
  else:
    ans=False
    
if ans:
  print("APPROVED")
else:
  print("DENIED")
n=int(input())
a=list(map(int,input().split()))
count=0
for i in range(0,n):
  if a[i]%2==0:
    if a[i]%3==0 or a[i]%5==0:
      count=count+1
  else:
    count=count+1
if count==n:
  print("APPROVED")
else:
  print("DENIED")
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
    if a[i]%2==1:
        pass
    else:
        if a[i]%3==0 or a[i]%5==0:
            pass
        else:
            print("DENIED")
            exit()
print("APPROVED")
N = int(input())
A = list(map(int, input().split()))
j = 0
for i in A:
    if i % 2 == 0:
        if i % 3 == 0 or i % 5 == 0:
            pass
        else:
            j += 1
    else:
        pass
if j > 0:
    print('DENIED')
else:
    print('APPROVED')
N = int(input())
s = list(map(int, input().split()))
cond = True
for i in s:
  if i%2 == 0:
    if i%3 == 0 or i%5 == 0:
      continue
    else:
      cond = False
      break
if cond is True:
  print("APPROVED")
else:
  print("DENIED")
N = int(input())
arr = list(map(int, input().split()))
for i in arr:
    if i % 2 == 0:
        if i % 3 != 0 and i % 5 != 0:
            print('DENIED')
            exit()
print('APPROVED')
n = int(input())
list = input().split()
flg=True
for i in list :
	i = int(i)
	if i%2==0 and not(i%3==0 or i%5==0):
		flg=False
		
if flg:
	print("APPROVED")
else:
	print("DENIED")
N = int(input())
A = list(map(int, input().split()))
ans = "APPROVED"

for n in range(N):
    if A[n] % 2 == 1:
        pass
    elif A[n] % 3 == 0:
        pass
    elif A[n] % 5 == 0:
        pass
    else:
        ans = "DENIED"
        break
print(ans)
N = int(input())
A = list(map(int, input().split()))
if all(i%3==0 or i%5==0 for i in A if i%2==0):
    print('APPROVED')
else:
    print('DENIED')
n = int(input())
a = [int(i) for i in input().split()]
count1 =0
count2 = 0
for i in a:
    if i%2==0:
        count1+=1
        if i%3==0 or i%5 == 0:
            count2+=1
    else:
        pass
if count1 == count2:
    print('APPROVED')
else:
    print("DENIED")
import numpy as np

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

a = np.array(A)

odd = a[a%2 == 0]

if np.sum((odd%3 != 0)&(odd%5 != 0)) == 0:
    print('APPROVED')
else:
    print('DENIED')
#!/usr/bin/env python3




def main():
    # Failed to predict input format
    n = int(input())
    a = list(map(int, input().split()))

    if all([i%3 == 0 or i%5 == 0 for i in a if i%2 == 0]):
        print('APPROVED')
    else:
        print('DENIED')
    

if __name__ == '__main__':
    main()
# -*- coding: utf-8 -*-
# input
n = int(input())
a = list(map(int, input().split()))

for i in range(n):
    if a[i] % 6 == 0:
        pass
    elif a[i] % 10 == 0:
        pass
    elif a[i] % 2 > 0:
        pass
    else:
        print('DENIED')
        exit()
print('APPROVED')
# 155 B

n = int(input())
s = list(map(int, input().split()))
valid = True

for i in s:
    if i % 2 == 0:
        if i % 3 != 0 and i % 5 != 0:
            valid = False

if valid == True:
    print("APPROVED")
elif valid == False:
    print("DENIED")
input()
paper_values = list(map(int, input().split()))
is_approved = True

for val in paper_values:
    if val % 2 != 0:
        continue

    if val % 3 == 0:
        continue

    if val % 5 == 0:
        continue

    is_approved = False

print("APPROVED" if is_approved else "DENIED")
n = int(input())
a = list(map(int,input().split()))
ok = True
for i in a:
    if i%2 == 0 :
        if i%3 != 0 and i%5 != 0:
            ok = False
            break
            
if ok:
    print("APPROVED")
else:
    print("DENIED")
N = int(input())
A = list(map(int,input().split()))

flag = 0
for num in range(N):
    tmp = A[num]
    flag = 0 if (tmp%2==0 and (tmp%3==0 or tmp%5==0)) or tmp%2==1 else 1
    if flag == 1:
        break

ans = 'APPROVED' if flag==0 else 'DENIED '
print(ans)