Harryxun/stf_run huggingface dataset:
import math
N = int(raw_input())
A = [int(i) for i in raw_input().split()]

num = 1

if len(A) == 2:
  print(max(A))
else:
  for i in range(len(A)):
    B = A[ : i] + A[i + 1:]
    g = reduce(math.gcd, B)
    if (g > num):
      num = g
  print num


### FIXED CODE ###

a, b, t = map(int, input().split())

n = t // a
print(n * b)
X=int(input())
import numpy as np
dp = np.zeros(X+1, dtype = int) #xに到達できる判定
dp[0] = 1
for t in range(1,X+1):
    if dp[X-t]==1:
        print(t)
        break
    else:
        dp[t:] = dp[:X+1-t]
    print(dp)

### FIXED CODE ###

X=int(input())
s=0
for t in range(X+1):
  s+=t
  if s>=X:
    print(t)
    break
inputRaw=input()
inputData=inputRaw.split(' ')

s=inputData[0]*inputData[1]
x=(inputData[0]+inputData[1])*2

print(str(s)&" "&str(x))

### FIXED CODE ###

a,b = list(map(int, input().split()))
x = 2 * (a+ b)
s = a * b
print(str(s) + " " + str(x))
#import math
# a,b =[int(i) for i in input().split()]

r=int(input())
#r=2
pi=3.1415926535
A=[pi*r**2,2*pi*r]
print("{0:.6f} {1:.6f}".format(A[0],A[1]))

### FIXED CODE ###

#import math
# a,b =[int(i) for i in input().split()]

r=float(input())
#r=2
pi=3.141592653589793
A=[pi*r**2,2*pi*r]
print("{0:.5f} {1:.5f}".format(A[0],A[1]))
S = input()
a = True
for i in range(len(S)):
    if len(S) % 2 != 0 :
        a=False 
        break
    else:
        if S[i/2] != 'h' or S[i/2 +1] !- 'i':
            a=False
            break

if a: 
    print('Yes')
else : 
    print('No')
        
     

### FIXED CODE ###

S = input()
a = True
for i in range(len(S)):
    if len(S) % 2 != 0:
        a = False 
        break
    else:
        if i %2==0 and (S[i] != 'h' or S[i+1] != 'i'):
            a = False

if a: 
    print('Yes')
else: 
    print('No')
input_arr = [input() for i in range(2)]
N = input_arr[0]
p_arr = input_arr[1].split(' ')

k = 0
for i in range(len(p_arr)):
    if int(p_arr[i]) == i + 1:
        pass
    else:
        k += 1
if k < 2:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

input_arr = input().split(" ")
A = int(input_arr[0])
B = int(input_arr[1])

# AとBの偶奇が一致する場合 存在する
# AとBの偶奇が一致しない場合 存在しない

if (A % 2 != B % 2):
    print("IMPOSSIBLE")
else:
    k = int((A + B) / 2)
    print(k)
def sieve(n):
    p = [True] * (n + 1)
    p[0] = p[1] = False
    
    for i in range(int(n ** 0.5) + 1):
        if p[i]:
            for j in range(2 * i, len(p), i):
                p[j] = False
    return p
def get_quad(n, p):
    for ni in range(n,0,-1):
        if p[ni] and p[ni - 2] and p[ni - 6] and p[ni - 8]:
            return ni
import sys
f = sys.stdin


n = [int(line) for line in f][:-1]
prime = sieve(max(n))
for ni in n:
    print(get_quad(ni, prime))

### FIXED CODE ###

def get_quad(n, p):
    if n < 19:
        return 13
    n = (n + 1) // 10 * 10 - 1
    for ni in range(n,0,-10):
        if p[ni] and p[ni - 2] and p[ni - 6] and p[ni - 8]:
            return ni
        
def sieve():
    n = 10000001
    p = [1] * n
    p[0] = p[1] = 0
    
    for i in range(int(n ** 0.5)):
        if p[i]:
            for j in range(2 * i, len(p), i):
                p[j] = 0
    return p

import sys
f = sys.stdin

prime = sieve()
while True:
    n = f.readline().strip()
    if not n.isdigit():
        continue
    n = int(n)
    if n == 0:
        break
    print(get_quad(n, prime))
K,X = map(int,input().split())

for i in range(max(-1000000,X-K+1), min(X+K,1000000):
    print(i, end=' ')


### FIXED CODE ###

K,X = map(int,input().split())

for i in range(X-K+1, X+K):
    if -1000000<=i<=1000000:
        print(i, end=' ')
a = int(input())
b = int(input())
print(a*b-a-b+1)

### FIXED CODE ###

a,b=input().split()
print((int(a)-1)*(int(b)-1))
#coding:utf-8

N = int(input())
S = input()
K = int(input())

base = S[K]
new = []

for i in range(N):
    if S[i] != base:
        new.append('*')
    else:
        new.append(base)

ans = ''.join(new)
print(ans)

### FIXED CODE ###

#coding:utf-8

N = int(input())
S = input()
K = int(input())

base = S[K-1]
new = []

for i in range(N):
    if S[i] != base:
        new.append('*')
    else:
        new.append(base)

ans = ''.join(new)
print(ans)
N,M = map(int,input().stlip())
S = input()
T = input()
import math
gcd_in = (math.gcd(N,M))
lcm_in = (math.lcm(N,M))
if gcd_in == 1:
    print(M*M)
elif gcd_in == M or gcd_in == N:
    for i in range(gcd_in):
    counter=0
        if S[N/gcd_in*i] == T[M/gcd_in*i]:
            counter += 1
    if counter==gcd_in:
        print(max(N,M))
    else:
        print(-1)
else:
    for i in range(min(lcm_in/N,lcm_in/M)):
    counter=0
        if S[lcm_in/M*i] == T[lcm_in/N*i]:
            counter += 1
        if counter==(min(lcm_in/N,lcm_in/M)):
            print(lcm_in)
        else:
            print(-1)
        

### FIXED CODE ###

n,m = map(int,input().split())
s = input()
t = input()
#greatest common divisor/least common multiple
import fractions
gcd = int(fractions.gcd(n,m))
lcm = int(n*m/gcd)
counter=0
for i in range(gcd):
    if s[int(n/gcd)*i]!=t[int(m/gcd)*i]:
        print(-1)
        counter+=1
        exit()
if counter == 0:
    print(lcm)
AキャンディーとNにんの子供イージー

# 競プロ幼稚園にはN人の子供がいます。えび先生は、子供たちを一列に並べ、一人目にはキャンディーを1個、二人目には2個,...,N人めにはN個あげることにしました。
# 必要なキャンディーの個数の合計は何個でしょう？
# 1 <= N <= 100

# Nは子供の人数
N = int(input())
# print(N)

# answerは合計個数
answer = (N * (N + 1) // 2)

print(answer)

### FIXED CODE ###

# AキャンディーとNにんの子供イージー

# 競プロ幼稚園にはN人の子供がいます。えび先生は、子供たちを一列に並べ、一人目にはキャンディーを1個、二人目には2個,...,N人めにはN個あげることにしました。
# 必要なキャンディーの個数の合計は何個でしょう？
# 1 <= N <= 100

# Nは子供の人数
N = int(input())
# print(N)

# answerは合計個数
answer = ((N + 1) * N // 2)

print(answer)
N = int(input())
es = [[] for i in range(N+1)]
for i in range(N-1):
    u, v, w = map(int, input().split())
    es[u].append([v,w])
    es[v].append([u,w])
dfs_map = [1 for i in range(N+1)]
col = [None] * (N+1)
def dfs(v, c):
    col[v] = c
    for e in es[v]:
        if dfs_map[e[0]]:
            dfs_map[e[0]] = 0
            if e[1] % 2:
                dfs(e[0], c^1)
            else:
                dfs(e[0], c)
dfs(1, 0)
for i in range(1, N+1):
    print(col[i])

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5+1)
N = int(input())
es = [[] for i in range(N+1)]
for i in range(N-1):
    u, v, w = map(int, input().split())
    es[u].append([v,w])
    es[v].append([u,w])
dfs_map = [1 for i in range(N+1)]
col = [None] * (N+1)
def dfs(v, c):
    col[v] = c
    for e in es[v]:
        if dfs_map[e[0]]:
            dfs_map[e[0]] = 0
            if e[1] % 2:
                dfs(e[0], c^1)
            else:
                dfs(e[0], c)
dfs_map[1] = 0
dfs(1, 0)
for i in range(1, N+1):
    print(col[i])
a,b=map(int, raw_input().split())
print(a*b)

### FIXED CODE ###

a,b=map(int, input().split())
print(a*b, a+a+b+b)
N = int(input())
result = [0,0,0,0]
for n in range(N):
    S = input()
    if S == "AC":
        result[0] += 1
    elif S == "WA":
        result[1] += 1
    elif S == "TLE":
        result[2] += 1
    else:
        result[3] += 1
name = ["AC","WA","TLE","RE"]
for res,nam in zip(result,name):
    print("%s x %d"%(nam,res))

### FIXED CODE ###

N = int(input())
mod = N%1000
if mod == 0:
  print(0)
else:
  print(1000-(N%1000))
class edge():
    def __init__(self,to,cost):
        self.to = to
        self.cost = cost

from heapq import *
class PriorityQueue(object):
    def __init__(self):
        self.queue = []
    def push(self, value):
        heappush(self.queue, value)
    def pop(self):
        return heappop(self.queue)
    def empty(self):
        return len(self.queue) == 0
    def size(self):
        return len(self)

from math import inf
from numpy import array


def djikstra(s):
    que = PriorityQueue()
    d = [inf]*V
    d[s] = 0
    que.push((0,s))
    while(not que.empty()):
        p = que.pop()
        v = p[1]
        if d[v] < p[0]:
            continue
        for i in range(len(G[v])):
            e = G[v][i]
            if d[e.to] > d[v] + e.cost:
                d[e.to] = d[v] + e.cost
                que.push((d[e.to],e.to))
    return d


n,m,s,t = map(int,input().split())
V = n
Ga = {}
Gb = {}
for i in range(n):
    Ga[i]=[]
    Gb[i]=[]
for i in range(m):
    u,v,a,b = map(int,input().split())
    Ga[u-1].append(edge(v-1,a))
    Ga[v-1].append(edge(u-1,a))
    Gb[u-1].append(edge(v-1,b))
    Gb[v-1].append(edge(u-1,b))

G = Ga
S = djikstra(s-1)
G = Gb
T = djikstra(t-1)

M = array(S)+array(T)

for i in range(n):
    print(10**15-min(M[i:]))


### FIXED CODE ###

from heapq import *
from numpy import array,inf


def djikstra(G,s):
    que = []
    d = [inf]*V
    d[s] = 0
    visited = [False] * V
    heappush(que,(0,s))
    while(len(que)!=0):
        p = heappop(que)
        v = p[1]
        if visited[v]:
            continue
        visited[v] = True
        for i in range(len(G[v])):
            e = G[v][i]
            if visited[e[0]]:
                continue
            if d[e[0]] > d[v] + e[1]:
                d[e[0]] = d[v] + e[1]
                heappush(que,(d[e[0]],e[0]))
    return d


n,m,s,t = map(int,input().split())
V = n
Ga = [[] for i in range(n)]
Gb = [[] for i in range(n)]
for i in range(m):
    u,v,a,b = map(int,input().split())
    Ga[u-1].append((v-1,a))
    Ga[v-1].append((u-1,a))
    Gb[u-1].append((v-1,b))
    Gb[v-1].append((u-1,b))

S = djikstra(Ga,s-1)

T = djikstra(Gb,t-1)

M = 10**15-(array(S)+array(T))
ans = [0]*n
ans[n-1] = M[n-1]
for i in range(n-2,-1,-1):
    ans[i] = max(ans[i+1],M[i])

for i in range(n):
    print(ans[i])
n = int(input())
ab = [tuple(map(int,input().split())) for i in range(n-1)]

es = [[] for i in range(n)]
for i, (a,b) in enumerate(ab):
    a,b = a-1,b-1
    es[a].append((b, i))
    es[b].append((a, i))


# BFS
root = 0 # 頂点1が存在することが問題文中で保証されてる
colors = {}
colors[(0,1)] = 0
color_parent = 0
K = 0
queue = [root]
visited = [0]*n
visited[root] = 1

ans_color = [0]*(n-1)

while queue:
    v = queue.pop(0)
    visited[v] = 1

    color = 1
    parent, _ = es[v][0]
    color_parent = colors[(v, parent)]

    for to, j in es[v]:
        if visited[to]: continue
        queue.append(to)

        if color == color_parent and v != root:
            color += 1

        colors[(v,to)] = color
        colors[(to,v)] = color

        ans_color[j] = color

        K = max(K, color)
        color += 1


print(K)
print(*ans_color, sep='\n')

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 7)

n = int(input())
ab = [tuple(map(int,input().split())) for i in range(n-1)]

es = [[] for i in range(n)]
for i, (a,b) in enumerate(ab):
    a,b = a-1,b-1
    es[a].append((b, i))
    es[b].append((a, i))

visited = [0]*n
ans_color = [0]*(n-1)

# DFS
def dfs(v, fromColor):
    color = 1
    visited[v] = 1
    for to, i in es[v]:
        if visited[to]: continue

        if color == fromColor:
            color += 1
        ans_color[i] = color
        dfs(to, color)
        color += 1

root = 0 # 頂点1が存在することが問題文中で保証されてるからここを根ノードとしよう
dfs(root, 0)

print(max(ans_color))
print(*ans_color, sep='\n')
N = int(input())
A = list(map(int, input().split()))

flag = 0

for i in range(N):
    if A[i] % 2 == 0:
        if A[i] % 3 == 0 or A[i] % 5 == 0:
            pass
        else:
            flag = 1
            break
        
if flag = 0:
    print("APPROVED")
else:
    print("DENIED")

### FIXED CODE ###

a = set(map(int, input().split()))
if len(a) == 2:
  print("Yes")
else:
  print("No")
n, m = map(int, input().split())
kouyaku_max = m // n
kouyaku = 1
for i in range(min(kouyaku_max,int(m**0.5)),0,-1):
    if ((m % (i) == 0) and (n*i <= m)):
        kouyaku = i
        break

print('{}'.format(kouyaku))

### FIXED CODE ###

a = int(input())
if a == 1:
    print("Hello World")
else:
    b = int(input())
    c = int(input())
    print('{}'.format(b+c))
c = 0

while True:
    x = int(input())　; c +=1
    
    if x == 0:
        break
   
    print("Case {}: {}".format(c, x))


### FIXED CODE ###

c = 0

while True:
    x = int(input())
    c +=1
    
    if x == 0:
        break
   
    print("Case {}: {}".format(c, x))
import math
n,m = map(int,input().split())
print(n*m//math.gcd(n,m))

### FIXED CODE ###

import fractions
n,m = map(int,input().split())
print(n*m//fractions.gcd(n,m))
a, b, k = map(int, input().split())
temp = a if a>b else b
list =  [i  for i in range(1,temp+1) if a%i==0 and b%i==0]
list = list[::-1]
print(list[k-1]

### FIXED CODE ###


a, b, k = map(int, input().split())
temp = a if a>b else b
list =  [i  for i in range(1,temp+1) if a%i==0 and b%i==0]
list = list[::-1]
print(list[k-1])
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]

    query_range = list(range(a, b + 1))
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]
    print(query_range)
    sys.exit()
    # for i in res:
    #     print(i)
    
if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys

a, b, k = map(int, sys.stdin.readline().split())

def main():
    if k >= b - a + 1:
        res = list(range(a, b+1))
    else:
        res = set(range(a, a+k)) | set(range(b, b-k, -1))
        res = sorted(res)
    return res

if __name__ == '__main__':
    ans = main()
    print(*ans, sep='\n')
a,b,c,d=map(int,input().split())
while True:
	c-=b
	if c<=0:
		print("Yes")
		break
	a-=d
	if a<=0:
		print("No")
		break


### FIXED CODE ###

N = int(input())
S = list()
for i in range(N):
  S.append(input())
S1 = set(S)
print(len(S1))
s = input()
print("AC" if(s[0] == "A" and s[2:len(s)-1].count("C") == 1 and (s[1:s.find('C')]+s[s.find('C')+1:]).islower())


### FIXED CODE ###

s = input()
print("AC" if(s[0] == "A" and s[2:len(s)-1].count("C") == 1 and (s[1:s.find('C')]+s[s.find('C')+1:]).islower()) else "WA")
M = int(input())
    
  print(48-M)

### FIXED CODE ###

def ABC_84_A():
    M = int(input())
    
    print(48-M)

if __name__ == '__main__':

    ABC_84_A()
x,y,z,k=map(int,input().split())
a=sorted(list(map(int,input().split())),reverse=True)
b=sorted(list(map(int,input().split())),reverse=True)
c=sorted(list(map(int,input().split())),reverse=True)
d=[0]*(x*y)
e=[0]*(x*y*z)
m,n=0,0

for i in range(x):
  for j in range(y):
    d[m]=a[i]+b[j]
    m += 1

d=sorted(d,reverse=True)
for i in range(x*y):
  for j in range(z):
    e[n]=d[i]+c[j]
    n += 1
    
e=sorted(e,reverse=True)
for i in range(k):
  print(e[i])

### FIXED CODE ###

import heapq

def main():
  X,Y,Z,K=map(int,input().split())
  A=list(reversed(sorted(map(int,input().split()))))
  B=list(reversed(sorted(map(int,input().split()))))
  C=list(reversed(sorted(map(int,input().split()))))
  q=[(-A[0]-B[0]-C[0],0,0,0)]
  queued={(0,0,0)}
  for i in range(K):
    v,s,t,u=heapq.heappop(q)
    print(-v)
    for e,f,g in [(s,t,u+1),(s,t+1,u),(s+1,t,u)]:
      if e>=X or f>=Y or g>=Z:
        continue
      if (e,f,g) in queued:
        continue
      heapq.heappush(q,(-(A[e]+B[f]+C[g]),e,f,g))
      queued.add((e,f,g))
      
if __name__=="__main__":
  main()
import math
import sys
n = int(input())
s = int(input())

def f(b, n):
    if n == 0:
        return 0
    return f(b, n//b) + n % b

if s > n:
    print(-1)

sn = math.ceil(math.sqrt(n))
for i in range(2, sn):
    if f(i, n) == s:
        print(i)
        sys.exit(0)

for i in range(1, sn):
    if (n - s) % i == 0:
        b = (n-s)//i + 1
        if 1 + n % b == s and b + n % b == n:
            print(b)
            sys.exit(0)
if s == n:
    print(n)
else:
    print(-1)

### FIXED CODE ###

import math
import sys

n = int(input())
s = int(input())

def f(b, n):
    if n == 0:
        return 0
    return f(b, n//b) + n % b

if s > n:
    print(-1)
    sys.exit(0)

sn = math.ceil(math.sqrt(n))
for i in range(2, sn+1):
    if f(i, n) == s:
        print(i)
        sys.exit(0)

ans = n + 1
for i in range(1, sn+1):
    if (n - s) % i == 0:
        b = (n-s)//i + 1
        if b >= 2 and f(b, b * i + n%b) == s:
            ans = min((ans, b))
if s == n:
    print(n+1)
elif ans < n + 1:
    print(ans)
else:
    print(-1)
n = int(input())
nums = []
for i in range(n):
    nums.insert(i,int(input()))
for i in range(n):
    print(max(max(nums[0:i],nums[i+1:n+1])))

### FIXED CODE ###

r = input()
print(int(r)**2 * 3)
from math import gcd
from functools import reduce

N,X = map(int, input().split())
xn = list(map(lambda x: int(x)-X, input().split()))
print(reduce(gcd, xn))


### FIXED CODE ###

from fractions import gcd
from functools import reduce

N,X = map(int, input().split())
xn = list(map(lambda x: int(x)-X, input().split()))
print(abs(reduce(gcd, xn)))
m = int(input())
L = []
for _ in range(m):
    L.append(list(map(int, input().split())))

short = []
additional = 0
for elm in L:
    additional += (elm[1] - 1)
    total = elm[0] * elm[1]
    if total > 9:
        if total % 9 == 0:
            additional += (total // 9) - 1
        else:
            additional += total // 9
        # additional += (total - 1) // 9
    if total > 9:
        if total % ９＝＝０：
            res = 9
        else:
            res = total % 9
    else:
        res = total
    short.append(res)

prev = 0
additional += len(short) - 1
for elm in short:
    prev = prev + elm
    if prev > 9:
        prev -= 9
        additional += 1

print(additional)



### FIXED CODE ###

m = int(input())
L = []
for _ in range(m):
    L.append(list(map(int, input().split())))

short = []
additional = 0
for elm in L:
    additional += (elm[1] - 1)
    total = elm[0] * elm[1]
    if total > 9:
        if total % 9 == 0:
            additional += (total // 9) - 1
        else:
            additional += total // 9
        # additional += (total - 1) // 9
    if total > 9:
        if total % 9 == 0:
            res = 9
        else:
            res = total % 9
    else:
        res = total
    short.append(res)

prev = 0
additional += len(short) - 1
for elm in short:
    prev = prev + elm
    if prev > 9:
        prev -= 9
        additional += 1

print(additional)
S = input()
a = ""
stock = ""
data = []

for i in S:
    a = a + i
    if a != stock:
        stock = a
        data.append(a)
        a = ""
count = len(data)


if a == stock:
    i = 1
    data.append(a)
    check = 1
    c = 0
    while True:
        word = ""
        a = ""
        c = 0
        stock2 = ""
        data2 = []
        for j in range(i+1):
            word = data[-(j+1)] + word
        
        for j in reversed(word):
            c += 1
            a = j + a
            if check > c:
                continue
            if a != stock2:
                stock2 = a
                data2.insert(0,a)
                a = ""
        if (len(S)<=i+2) and (data2[0]!=data2[1]) and (a == ""):
            count = len(data2)
            break
        elif len(S)<=i+2:
            check += 1
            continue
        if (data2[0] != data[-(i+2)]) and (a == ""):
            count = len(data) - (i+1) + len(data2)
            break
        i += 1
        
        
print(count)

### FIXED CODE ###

S = input()
a = ""
stock = ""
data = []

for i in S:
    a = a + i
    if a != stock:
        stock = a
        data.append(a)
        a = ""
count = len(data)


if a == stock:
    i = 1
    data.append(a)
    check = 1
    c = 0
    while True:
        word = ""
        a = ""
        c = 0
        stock2 = ""
        data2 = []
        for j in range(i+1):
            word = data[-(j+1)] + word
        
        for j in reversed(word):
            c += 1
            a = j + a
            if check > c:
                continue
            if a != stock2:
                stock2 = a
                data2.insert(0,a)
                a = ""
        if len(data2)>=2:
            if (len(S)<=i+2) and (data2[0]!=data2[1]) and (a == ""):
                count = len(data2)
                break
            elif len(S)<=i+2:
                check += 1
                if check == len(S):
                    count = 1
                    break
                continue
        elif (len(data2)==1) and (a==""):
            if S==data2[0]:
                count = 1
                break
            else:
                i += 1
                continue
        elif len(data2)==1:
            check += 1
            continue
        if (data2[0] != data[-(i+2)]) and (a == ""):
            count = len(data) - (i+1) + len(data2)
            break
        i += 1
        

print(count)
N, Q = [int(x) for x in input().split()]
ab_list = [[int(x) for x in input().split()] for _ in range(N-1)]
px_list = [[int(x) for x in input().split()] for _ in range(Q)]
to = [[] for _ in range(N+1)]
for a, b in ab_list:
    to[a].append(b)
subtree = [[i] for i in range(N+1)]
def dfs(r, i):
    if (len(to[i])):
        for j in to[i]:
            subtree[r].append(j)
            dfs(r, j)
    else:
        return
for i in range(1, N):
    dfs(i, i)

ans = [0 for _ in range(N)]
for p, x in px_list:
    for u in subtree[p]:
        ans[u-1] += x
print(' '.join([str(i) for i in ans]))


### FIXED CODE ###

N, Q = [int(x) for x in input().split()]
to = [[] for _ in range(N+1)]
for _ in range(N-1):
    a, b = [int(x)-1 for x in input().split()]
    to[b].append(a)
    to[a].append(b)
ans = [0] * N
for _ in range(Q):
    p, x = [int(x) for x in input().split()]
    p -= 1
    ans[p] += x

from collections import deque
q = deque()
q.append(0)
visited = [0] * N

while(q):
    v = q.pop()
    visited[v] = 1    
    for u in to[v]:
        if visited[u] == 1: continue
        ans[u] += ans[v]
        q.append(u)
print(' '.join([str(i) for i in ans]))
n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[]
  y=[]
  for j in range(a):
    x,y=[int(s) for s in input().split()]
  X[len(X):len(X)]=x
  Y[len(Y):len(Y)]=y
  #X.append(x)
  #Y.append(y)
  

c=0
for i in range(n):
  l=[1]*n
  for j in range(i,n-i):
    if l[j]==0:continue
    for k in range(A[j]):
      b=X[j][k]
      #l[b] *= Y[j][k]

if c < l.count(1):
  c=l.count(1) 
  
        
  
print(c)  
   

### FIXED CODE ###

n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[0]*a
  y=[0]*a
  for j in range(a):
    x[j],y[j]=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
s=0
for i in range(2**n):
  c=0
  d=0
  B=[0]*n
  for j in range(n):
    if((i >> j) & 1):
      c=c+1
      B[j]=1
  for k in range(n):
    if B[k]==1:
      for j in range(A[k]):
        if Y[k][j]!=B[X[k][j]-1]:
          d=-1
          break
    if d<0:
      break
  if s<c and d==0:
    s=c
      
      
print(s)
n = int(input())
a_input=list(map(int,input().split()))

rate_li=[0]*9
top_coder=0
for a in a_input:
    rate_li[a//400]+=1

min_ = sum(i!=0 for i in rate_li[:8])
print(min_,min(8,min_+rate_li[-1]))

### FIXED CODE ###

n = int(input())
a_input=list(map(int,input().split()))

rate_li=[0]*9
top_coder=0
for a in a_input:
    rate_li[min(a//400,8)]+=1
#print(rate_li)
min_ = sum(i!=0 for i in rate_li[:8])
print(max(min_,1),min_+rate_li[-1])