Harryxun/stf_run huggingface dataset:
N,K = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
mi = 0
zero = 0
for a in A:
  if a<0:
    mi+=1
  elif a==0:
    zero+=1
  else:
    break

plu = N-mi-zero
A_mi = A[0:mi:]
A_mi_rev = A_mi[::-1]
A_plu = A[mi+zero::]
A_plu_rev = A_plu[::-1]
num_mi = plu*mi
num_zero = (plu+mi)*zero+(zero*(zero-1))//2
r = A[-1]**2+1
l = A[0]*A[-1]-1
while l+1!=r:
  m = (l+r)//2
  num = 0
  if m>0:
    num+=num_mi+num_zero
    if num>=K:
      r=m
      continue
    cou=0
    for i in range(0,plu-1):
      j = max(i+1,cou)
      while True:
        if j==plu:
          cou=j
          num+=j-i-1
          break
        x = A_plu_rev[i]*A_plu_rev[j]
        if x<m:
          j+=1
        else:
          cou=j-1
          num+=j-i-1
          break
      if num>=K:
        break
    if num>=K:
      r=m
      continue
    for i in range(0,mi-1):
      j = max(i+1,cou)
      while True:
        if j==mi:
          cou=j
          num+=j-i-1
          break
        x = A_mi[i]*A_mi[j]
        if x<m:
          j+=1
        else:
          cou=j-1
          num+=j-i-1
          break
      if num>=K:
        break
        
    if num>=K:
      r=m
    else:
      l=m
      
  elif m==0:
    num+=num_mi
    if num>=K:
      r=m
    else:
      l=m
  else:
    b = plu
    cou = 0
    for a in A_mi_rev:
      while True:
        if cou==b:
          num+=cou
          break
        x = a*A_plu_rev[cou]
        if x<m:
          cou+=1
        else:
          num+=cou
          break
          
      if num>=K:
        break
    if num>=K:
      r = m
    else:
      l = m
      
print(l)

### FIXED CODE ###

N,K = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
mi = 0
zero = 0
for a in A:
  if a<0:
    mi+=1
  elif a==0:
    zero+=1
  else:
    break

plu = N-mi-zero
A_mi = A[0:mi:]
A_mi_rev = A_mi[::-1]
A_plu = A[mi+zero::]
A_plu_rev = A_plu[::-1]
num_mi = plu*mi
num_zero = (plu+mi)*zero+(zero*(zero-1))//2
r = max(A[-1]**2+10,A[0]**2+10)
l = A[0]*A[-1]-10
while l+1!=r:
  m = (l+r)//2
  num = 0
  if m>0:
    num+=num_mi+num_zero
    if num>=K:
      r=m
      continue
    cou=0
    for i in range(0,plu):
      while True:
        if cou>=plu-i-1:
          num+=plu-i-1
          break
        x = A_plu_rev[i]*A_plu[cou]
        if x<m:
          cou+=1
        else:
          num+=cou
          break
          
      if num>=K:
        break
    if num>=K:
      r=m
      continue
    cou = 0
    for i in range(0,mi):
      while True:
        if cou>=mi-i-1:
          num+=mi-i-1
          break
        x = A_mi[i]*A_mi_rev[cou]
        if x<m:
          cou+=1
        else:
          num+=cou
          break
          
      if num>=K:
        break

    if num>=K:
      r=m
    else:
      l=m
    
  elif m==0:
    num+=num_mi
    if num>=K:
      r=m
    else:
      l=m
  else:
    cou = 0
    for a in A_mi_rev:
      while True:
        if cou==plu:
          num+=cou
          break
        x = a*A_plu_rev[cou]
        if x<m:
          cou+=1
        else:
          num+=cou
          break
          
      if num>=K:
        break
    if num>=K:
      r = m
    else:
      l = m
      
print(l)
N,M=map(int,inputt().split())
print(N*(N-1)+M*(M-1))

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
N, M = map(int, readline().split())
x = M * (M - 1) // 2
x += N * (N - 1) // 2
print(x)
import heapq

def dijkstra(ad_lst, n, s, t):
    costs = [float('inf') for i in range(n+1)]
    costs[s] = 0
    prevs = [-1 for _ in range(n+1)]
    Q = []
    for i in range(1, n+1):
        heapq.heappush(Q, [costs[i], i])

    while(Q != []):
        c, u = heapq.heappop(Q)
        for v, c in ad_lst[u]:
            alt = costs[u] + c
            if alt < costs[v]:
                prevs[v] = u
                Q.remove([costs[v], v])
                heapq.heappush(Q, [alt, v])
                costs[v] = alt

    return costs

n,m,s,t, = map(int, input().split())

route_y = {i: [] for i in range(n+1)}
route_s = {i: [] for i in range(n+1)}
for i in range(m):
    u, v, a, b = map(int, input().split())
    route_y[u].append([v,a])
    route_y[v].append([u,a])
    route_s[u].append([v,b])
    route_s[v].append([u,b])

cost_y = dijkstra(route_y, n, s, t)
cost_s = dijkstra(route_s, n, t, s)
cost_ys = [y+s for y, s in zip(cost_y, cost_s)]
result = [float('inf') for _ in range(n+1)]
min_cost = result[-1]
for i in range(n, 0, -1):
    if min_cost > cost_ys[i]:
        min_cost = cost_ys[i]
    result[i] = min_cost
yen = 10**15
for i in range(1, n+1):
    print(yen - result[i])


### FIXED CODE ###

import heapq
from itertools import accumulate
inf = float('inf')

def dijkstra(ad_lst, n, s):
    costs = [inf for i in range(n+1)]
    costs[s], Q = 0, []
    heapq.heappush(Q, [costs[s], s])

    while(Q != []):
        c, u = heapq.heappop(Q)
        for v, c in ad_lst[u].items():
            if costs[u] + c < costs[v]:
                heapq.heappush(Q, [costs[u] + c, v])
                costs[v] = costs[u] + c

    return costs

n,m,s,t, = map(int, input().split())

route_y = {i: {} for i in range(n+1)}
route_s = {i: {} for i in range(n+1)}
for i in range(m):
    u, v, a, b = map(int, input().split())
    route_y[u][v] = a
    route_y[v][u] = a
    route_s[u][v] = b
    route_s[v][u] = b

cost_y = dijkstra(route_y, n, s)
cost_s = dijkstra(route_s, n, t)
result = list(accumulate([y+s for y,s in zip(cost_y, cost_s)][::-1], min))
yen = 10**15
[print(yen-result[i]) for i in range(n-1, -1, -1)]
n = int(input())
lst = [105, 135, 165, 189, 195, 201]
for i in range(6):
    if n < lst(i):
        print(i)
        break

### FIXED CODE ###

n = int(input())
lst = [105, 135, 165, 189, 195, 201]
for i in range(6):
    if n < lst[i]:
        print(i)
        break
n = int(input())
a = input()
b = input()
c = input
count = 0

for i in range(n):
    if a[i] != b[i]:
        count += 1
    if b[i] != c[i]:
        count += 1
    if c[i] != a[i]:
        count += 1
print(count)

### FIXED CODE ###

n = int(input())
a = input()
b = input()
c = input()
count = 0 
for i in range(n):
    if a[i] == b[i]:
        if b[i] != c[i]:
            count += 1
    else:
        if a[i] == c[i] or b[i] == c[i]:
            count += 1
        else:
            count += 2
print(count)
A,B = map(int,input().split())
if A % B = 0:
  print(A + B)
else:
  print(A-B)
  

### FIXED CODE ###

A,B = map(int,input().split())
if round(B%A) == 0:
  print(A + B)
else:
  print(B-A)
string = input()
num = int(input())
if num == 0:
    print(string)
else:
    count=1
    out=string[0]

    for i,s in zip([i for i in range(len(string))],string):
        if i != 0:
            if i%num == 0:
                out=out+string[i]
    print(out)


### FIXED CODE ###

l = input().split()
if int(l[0])+int(l[1])==15:
    print('+')
elif int(l[0])*int(l[1]) ==15:
    print('*')
else:
    print('x')
n=int(input())

t=[]
for i in range(1,10):
  for j in range(1,10):
    t.append(i*j)

if n in t:
  print("Yes")
else:
  Print("No")

### FIXED CODE ###

n=int(input())
 
t=[]
for i in range(1,10):
  for j in range(1,10):
    t.append(i*j)

if n in t:
  print("Yes")
else:
  print("No")
def d201(a):
    count=0
    N=len(a)
    for i in range(N):
        if(i%2==0):
            if(a[i]=='0'):
                count+=1
        else:
            if(a[i]=='1'):
                count+=1
    return count

                
def d210(a):
    count=0
    N=len(a)
    for i in range(N):
        if(i%2==0):
            if(a[i]=='1'):
                count+=1
        else:
            if(a[i]=='0'):
                count+=1
    return count

a=input()
print(min(d210(a),d201(a))
                




### FIXED CODE ###

def d201(a):
    count=0
    N=len(a)
    for i in range(N):
        if(i%2==0):
            if(a[i]=='0'):
                count+=1
        else:
            if(a[i]=='1'):
                count+=1
    return count

                
def d210(a):
    count=0
    N=len(a)
    for i in range(N):
        if(i%2==0):
            if(a[i]=='1'):
                count+=1
        else:
            if(a[i]=='0'):
                count+=1
    return count

a=input()
print(min(d210(a),d201(a)))
n, k = map(int, input().split())
import math
mod = (10**9) +7
def kai(x):
  if x == 0:
    return 1
  elif x < 0:
    return 1
  else:
    return math.factorial(x)
  
for i in range(1, k+1):
  if n - k  + 1 >= i:
    result = (kai(k-1)*kai(n-k+1))/(kai(i-1)*kai(k-i)*kai(i)*kai(n-k+1-i))
    result2 = result % mod
    print(result2)
  else:
    print(0)




### FIXED CODE ###

n, k = map(int, input().split())
import math
mod = (10**9) +7
def kai(x):
  if x == 0:
    return 1
  elif x < 0:
    return 1
  else:
    return math.factorial(x)
  
for i in range(1, k+1):
  if n - k  + 1 >= i:
    result = (kai(k-1)*kai(n-k+1))//(kai(i-1)*kai(k-i)*kai(i)*kai(n-k+1-i))
    result2 = result % mod
    print(result2)
  else:
    print(0)
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
	dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
	dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  print(dic[i+1])

### FIXED CODE ###

[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
    dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
    dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  if i+1 in dic.keys():
    print(dic[i+1])
  else:
    print(0)
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def gcd(a,b):
  if b==0:
    return a
  return gcd(b,a%b)

def lcm(a,b):
  g=gcd(a,b)
  return a/g*b

def main():
  n=I()
  
  ans=I()
  for i in range(n-1):
    t=I()
    ans=int(lcm(ans,t))

  return ans

# main()
print(main())


### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

# GCD -- START --
def gcd(x,y):
  while y:
    x,y=y,x%y
  return x
# GCD --- END ---

# LCM -- START --
def lcm(x,y):
  return x*y//gcd(x,y)
# LCM --- END ---

def main():
  n=I()
  ans=I()

  for _ in range(n-1):
    ans=lcm(ans,I())

  return ans

# main()
print(main())
n, k = input().split()
n = int(n) #友人の数
k = int(k) #基準の高さ
m = []
result = 0
for i in range(n):
  m.append(int(input().split()))
#各人の身長を基準の高さと比較
for i in range(len(m)):
  if k <= m[i]:
    result += 1
  else:
    result += 0
print(result)

### FIXED CODE ###

N = input()
N = int(N)
if N%2 == 0:
  import math
  a = N/2/N  
  print('{:.6f}'.format(a))
else :
  a = (N+1)/2/N
  print('{:.6f}'.format(a))
b = input()

if b == "A"
    print("T")
elif b == "C"
    print("G")
elif b == "T"
    print("A")
else:
    print("C")
    

### FIXED CODE ###

b = input()
 
if  b=="A":
    print("T")
elif b=="C":
    print("G")
elif b=="T":
    print("A")
else:
    print("C")
a,b,c=map(int,input()split())
if b-a==c-b:
  print('YES')
else:
  print('NO')

### FIXED CODE ###

a,b,c=map(int,input().split())
if b-a==c-b:
  print('YES')
else:
  print('NO')
S=input()
print(S.count(1))

### FIXED CODE ###

print(input().count("1"))
from collections import defaultdict

N, M = map(int, input().split())
P, Y = [], []
ylist = defaultdict(list)
pset = set()
for i in range(M):
    p, y = map(int, input().split())
    P.append(p)
    Y.append(y)
    ylist[p].append(y)
    pset.add(p)
assert len(pset) == N

cdict = defaultdict(dict)
for p in pset:
    syear = sorted(ylist[p])
    for i, y in enumerate(syear):
        cdict[p][y] = i + 1

for i in range(M):
    p = P[i]
    y = Y[i]
    rank = cdict[p][y]
    print(f'{p:06}{rank:06}')


### FIXED CODE ###

from collections import defaultdict

N, M = map(int, input().split())
P, Y = [], []
ylist = defaultdict(list)
pset = set()
for i in range(M):
    p, y = map(int, input().split())
    P.append(p)
    Y.append(y)
    ylist[p].append(y)
    pset.add(p)

cdict = defaultdict(dict)
for p in pset:
    syear = sorted(ylist[p])
    for i, y in enumerate(syear):
        cdict[p][y] = i + 1

for i in range(M):
    p = P[i]
    y = Y[i]
    rank = cdict[p][y]
    print('{:06}{:06}'.format(p, rank))
x = input()
print(x ** 3)

### FIXED CODE ###

x = input()
y = int(x)**3
print(y)
n = int(input())
a = list(map(int,input().split()))

mod = 10**9+7
sum_a = sum(a)%mod
sum_a2 = sum_a**2%mod

for i in range(n):
    sum_a2 -= (a[i]**2)
    sum_a2 %= mod
    
if sum_a2%2 == 0:
    ans = sum_a2//2
else:
    ans = ((ans+mod)//2)%mod

print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
 
mod = 10**9+7
sum_a = sum(a)%mod
sum_a2 = sum_a**2%mod
 
for i in range(n):
    sum_a2 -= (a[i]**2)%mod
    sum_a2 %= mod
    
if sum_a2%2 == 0:
    ans = sum_a2//2
else:
    ans = ((sum_a2+mod)//2)%mod

print(ans)
N = int(input())
S = 0
for i in range(1, N+1):
  if i%3==0 or i%5==0 or (i%3==0 and i%5==0):
	continue
  S+=i
print(S) 

### FIXED CODE ###

N = int(input())
out = 0
for i in range(1,N+1):
    if i%3 == 0 and i%5 == 0 or i%3==0 or i%5==0:
       continue
    out += i
print(out)
n = int(input())
h = list(map(int,input().split()))
cost = [100000] * n
cost[0] = 0
cost[1] = abs(h[0]-h[1])
for i in range(2,n):
    sgl = cost[i-1] + abs(h[i]-abs[i-1])
    dbl = cost[i-2] + abs(h[i]-abs[i-2])
    cost[i] = min(sgl,dbl)
print(cost[n])

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
cost = [100000] * n
cost[0] = 0
cost[1] = abs(h[0]-h[1])
for i in range(2,n):
    sgl = cost[i-1] + abs(h[i]-h[i-1])
    dbl = cost[i-2] + abs(h[i]-h[i-2])
    cost[i] = min(sgl,dbl)
print(cost[-1])
n = int(input())
S = input()

R = []
G = []
B = []

for i in range(n):
    if S[i] == 'R':
        R.append(i)
    elif S[i] == 'G':
        G.append(i)
    else:
        B.append(i)

#print(R, G, B)

cnt = 0
r = R[0]
g = G[0]
b = B[0]

iR = 0
iG = 0
iB = 0

def ccc(ia, ib, ic, BB, CC):
    cnt = 0
    for aa in BB[ib:]:
        if aa > ia:
            for aaa in CC[ic:]:
                if aaa > aa and (aa - ia) != (aaa - aa):
                        #print(ia, aa, aaa)
                        cnt += 1
    return cnt

for i in range(n):
    if S[i] == 'R':
        if iR < len(R):
            iR += 1
            cnt += ccc(i, iG, iB, G, B)
            cnt += ccc(i, iB, iG, B, G)
        # else:
        #     print(iR)
    elif S[i] == 'G':
        if iG < len(G):
            iG += 1
            cnt += ccc(i, iR, iB, R, B)
            cnt += ccc(i, iB, iR, B, R)
        # else:
        #     print(iG)
    else:
        if iB < len(B):
            iB += 1
            cnt += ccc(i, iG, iR, G, R)
            cnt += ccc(i, iR, iG, R, G)
        # else:
        #     print(iB)
    
print(cnt)


### FIXED CODE ###

n = int(input())
S = input()

R = {}
G = {}
B = {}

for i in range(n):
    if S[i] == 'R':
        R[i] = None
    elif S[i] == 'G':
        G[i] = None
    else:
        B[i] = None

#print(R, G, B)

cnt = 0

cnt = len(R) * len(G) * len(B)

for b in B:
    for g in G:
        if (b + g) / 2 in R:
            cnt -= 1

for r in R:
    for b in B:
        if (r + b) / 2 in G:
            cnt -= 1

for r in R:
    for g in G:
        if (r + g) / 2 in B:
            cnt -= 1
            
print(cnt)
S, W = map(int, input().split())
if S < = W :
  print('unsafe')
else :
  print('safe')

### FIXED CODE ###

S, W = map(int, input().split())

if S <= W :
  print('unsafe')
else :
  print('safe')
import numpy as np
MOD = 1000000007
s = [int(x) if x!="?" else -1 for x in input()]
dp = np.full((len(s), 13), 0, dtype="int64")
 
if s[0] == -1:
    dp[0][0:10] = 1
else:
    dp[0][int(s[0])] = 1
 
table = [ s % 13 for s in range(130)]
for index in range(1, len(s)):
    if not s[index] == -1:
        value = int(s[index])
 
        for old_amari in range(13):
            new_amari = (table[old_amari * 10] + value) % 13
            dp[index][new_amari] += dp[index-1][old_amari]
    else:
        for value in range(10):
            for old_amari in range(13):
                new_amari = (table[old_amari * 10] + value) % 13
                dp[index][new_amari] += dp[index - 1][old_amari]
 
    dp[index] = dp[index] % MOD
 
print(dp[len(s)-1][5])

### FIXED CODE ###

MOD = 1000000007
s = [int(x) if x!="?" else -1 for x in input()]
dp = [[0] *  13 for _ in range(len(s))] 

if s[0] == -1:
    for i in range(10):
        dp[0][i] = 1
else:
    dp[0][int(s[0])] = 1
 
table = [ s % 13 for s in range(130)]
for index in range(1, len(s)):
    if not s[index] == -1:
        value = int(s[index])
 
        for old_amari in range(13):
            new_amari = (table[old_amari * 10] + value) % 13
            dp[index][new_amari] += dp[index-1][old_amari]
    else:
        for value in range(10):
            for old_amari in range(13):
                new_amari = (table[old_amari * 10] + value) % 13
                dp[index][new_amari] += dp[index - 1][old_amari]
 
    for i in range(len(dp[index])):
        dp[index][i] %= MOD

print(dp[len(s)-1][5])
N = int(input())
P = list(map(int, input().split()))
ans = 0
for i in range(N):
    if i + 1 == P[i]:
        ans += 1
        P[i+1] = P[i]
print(ans)


### FIXED CODE ###

N = int(input())
P = list(map(int, input().split()))
ans = 0
for i in range(N-1):
    if i + 1 == P[i]:
        ans += 1
        P[i+1] = P[i]
if N == P[-1]:
    ans += 1
print(ans)
a,b =map(int,input().split())
c = 1
for i in range(a):
  if (b-2*i)%4==0:
    c = 0
    break
if c ==1:
  print("No")
else:
  print("Yes")


### FIXED CODE ###

x = list(map(int,input().split()))
print (x.index(0)+1)
n = int(input())
alst = [float(input()) for _ in range(n)]

int_cnt = 0
lst = [[0 for _ in range(10)] for _ in range(10)]
lst2 = [[0 for _ in range(20)] for _ in range(30)]
for num in alst:
    if num % 1 == 0:
        int_cnt += 1
        b = 0
        f = 0
        while num % 2 == 0:
            b += 1
            num //= 2
        while num % 5 == 0:
            f += 1
            num //= 5
        b = min(9, b)
        lst[b][f] += 1
    else:
        num *= 10 ** 9
        b = 1
        f = 1
        while num % 2 == 0:
            f += 1
            num //= 2
        while num % 5 == 0:
            b += 1
            num //= 5
        lst2[b][f] += 1

ans = int_cnt * (int_cnt - 1) // 2

for i in range(10):
    for j in range(10):
        cnt = 0
        for k in range(max(10 - i, 0), 30):
            for l in range(10 - j, 20):
                cnt += lst2[k][l]
        ans += lst[i][j] * cnt

cnt = 0
for i in range(11, 20):
    for j in range(20):
        cnt += lst2[i][j]

cnt2 = 0
for i in range(11, 20):
    for j in range(30):
        cnt2 += lst2[j][i]

ans += cnt * cnt2
print(ans)


### FIXED CODE ###

n = int(input())

lst = [[0 for _ in range(25)] for _ in range(25)]
int_cnt = 0
for _ in range(n):
    a = input()
    if "." in a:
        pos = a.index(".")
        a1, a2 = a[:pos], a[pos + 1:]
        l = len(a2)
        a = a1 + a2
        a = int(a)
        a *= 10 ** (9 - l)
    else:
        a = int(a)
        int_cnt += 1
        a *= 10 ** 9
    t = 0
    while a % 2 == 0:
        t += 1
        a //= 2
    f = 0
    while a % 5 == 0:
        f += 1
        a //= 5
    t = min(t, 24)
    f = min(f, 24)
    lst[t][f] += 1


 
ans = 0
for i in range(25):
    for j in range(25):
        for k in range(25):
            for l in range(25):
                if i + j >= 18 and k + l >= 18:
                    if i == j and k == l:
                        tmp = lst[i][k]
                        ans += tmp * (tmp - 1)
                    else:
                        ans += lst[i][k] * lst[j][l]
print(ans // 2)
s = input()
s[3]=8
print(s)

### FIXED CODE ###

s = input()
s = s.replace('2017','2018')
print(s)
N = int(input())
A = list(map(int, input().split()))

ans = 'APPROVED'
for i in range(N):
  if N[i] % 2 == 0:
    if N[i] % 3 != 0 or N[i] % 5 != 0:
      ans = 'DENIED'
      break
      
print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
 
ans = 'APPROVED'
for i in range(N):
  if A[i] % 2 == 0:
    if A[i] % 3 != 0 and A[i] % 5 != 0:
      ans = 'DENIED'
      break
      
print(ans)
H, W = map(int, input().split())
if H%3 == 0 or H%3 == 0:
    ans = 0
else:
    ansl = [H] + [W] + [H*W] * 2
    if W%2 == 0:
        for i in range(1, H):
            tmp = abs(i * W - (H-i) * W // 2)
            if ansl[2] > tmp:
                ansl[2] = tmp
    else:
        for i in range(1, H):
            S1 = W * i
            S2 = (H-i) * (W//2)
            S3 = H*W - S1 - S2
            tmp = max(S1, S2, S3) - min(S1, S2, S3)
            if ansl[2] > tmp:
                ansl[2] = tmp
    if H == W:
        ansl[3] = ansl[2]
    elif H%2 == 0:
        for i in range(1, W):
            tmp = abs(i * H - (W-i) * H // 2)
            if ansl[3] > tmp:
                ansl[3] = tmp
    else:
        for i in range(1, W):
            S1 = H * i
            S2 = (W-i) * (H//2)
            S3 = H*W - S1 - S2
            tmp = max(S1, S2, S3) - min(S1, S2, S3)
            if ansl[3] > tmp:
                ansl[3] = tmp
	ans = min(ansl)
print(ans)


### FIXED CODE ###

H, W = map(int, input().split())
if H%3 == 0 or H%3 == 0:
    ans = 0
else:
    ansl = [H] + [W] + [H*W] * 2
    if W%2 == 0:
        for i in range(1, H):
            tmp = abs(i * W - (H-i) * W // 2)
            if ansl[2] > tmp:
                ansl[2] = tmp
    else:
        for i in range(1, H):
            S1 = W * i
            S2 = (H-i) * (W//2)
            S3 = H*W - S1 - S2
            tmp = max(S1, S2, S3) - min(S1, S2, S3)
            if ansl[2] > tmp:
                ansl[2] = tmp
    if H == W:
        ansl[3] = ansl[2]
    elif H%2 == 0:
        for i in range(1, W):
            tmp = abs(i * H - (W-i) * H // 2)
            if ansl[3] > tmp:
                ansl[3] = tmp
    else:
        for i in range(1, W):
            S1 = H * i
            S2 = (W-i) * (H//2)
            S3 = H*W - S1 - S2
            tmp = max(S1, S2, S3) - min(S1, S2, S3)
            if ansl[3] > tmp:
                ansl[3] = tmp
    ans = min(ansl)
print(ans)
if(a==b==c):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a, b, c = map(int, input().split())
if(a==b==c):
  print("Yes")
else:
  print("No")
N = int(input())
S = [int(input()) for n in range(N)]
assert len(S) == N
counts = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

for s in S:
  counts[s] += 1

for key in ['AC', 'WA', 'TLE', 'RE']:
	print('{} x {}'.format(key, counts[key])

### FIXED CODE ###

N = int(input())
S = [input() for n in range(N)]
assert len(S) == N
counts = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

for s in S:
  counts[s] += 1

for key in ['AC', 'WA', 'TLE', 'RE']:
	print('{} x {}'.format(key, counts[key]))
N = int(input())
S, T = input().split()
A = ""

for i in range(N):
    A += S[i] + T[i]
    
print(A)

### FIXED CODE ###

A = int(input())
B = int(input())
 
print(6-A-B)	#和から誤答を引けば正答