Harryxun/stf_run huggingface dataset:
import sys
N,A,B = map(int,input().split())

if not ( 1 <= N <= 10**18 and 0 <= A and 0 <= B and 0 < A + B <= 10**18 ): sys.exit()
if not ( isinstance(N,int) and isinstance(A,int) and isinstance(B,int) ): sys.exit()

count = 0
while N >= 0:
    if N <= A:
        remind = N
        break
    N -= A+B
    count += 1
print(count * A + remind)

### FIXED CODE ###

import sys
N,A,B = map(int,input().split())

if not ( 1 <= N <= 10**18 and 0 <= A and 0 <= B and 0 < A + B <= 10**18 ): sys.exit()
if not ( isinstance(N,int) and isinstance(A,int) and isinstance(B,int) ): sys.exit()

count = N // (A+B)
remind = N % (A+B) if N % (A+B) <= A else A
    
print(count * A + remind)
import sys
sys.setrecursionlimit(10**9)

def f(x):#dpは
    if dp[x]!=-1:
        return dp[x]#すでに値が決まっていたらそれをかえす
    ans=0
    for e in d[x]:#すべての枝について
        ans=max(ans,1+f(e))
    dp[x]=ans
    return ans

n,m = list(map(int, input().split()))
d = {}
dp = [[-1] for i in range(n+1)]#初期値を全て-1に設定
    
for _ in range(m):
    a,b = list(map(int, input().split()))
    d[a].append(b)#有向グラフ
    
ans=0
for i in range(1,n+1):
    ans=max(ans,f(i))
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)

def f(x):#dpは
    if dp[x]!=-1:
        return dp[x]#すでに値が決まっていたらそれをかえす
    ans=0
    for e in d[x]:#すべての枝について
        ans=max(ans,1+f(e))
    dp[x]=ans
    return ans

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

d={}
dp=[-1]
for i in range(1,n+1):
    d[i]=[]#dは初期値を[]
    dp.append(-1)#dpは初期値-1

for _ in range(m):
    a,b = map(int, input().split())
    d[a].append(b)#有向グラフをdictで
    
ans=0
for i in range(1,n+1):
    ans=max(ans,f(i))
print(ans)
N = int(input())
xylist = [[0, 0]]*N
for i in range(N):
  xy = list(map(int, input().split()))
  xylist[i] = xy

dl = {}
for i in range(N):
  for j in range(i+1, N):
    dx = str(xylist[j][0] - xylist[i][0])
    dy = str(xylist[j][1] - xylist[i][1])
    l = dx + "|" + dy
    if dx == "0" and dy == "0":
      continue
    if l in dl:
      dl[l] = dl[l] + 1
    else:
      dl[l] = 1

cnt = N - max(dl.values())
print(cnt if cnt > 1 else "1")

### FIXED CODE ###

N = int(input())
xylist = [[0, 0]]*N
for i in range(N):
  xy = list(map(int, input().split()))
  xylist[i] = xy

dl = {}
for i in range(N):
  for j in range(N):
    dx = str(xylist[j][0] - xylist[i][0])
    dy = str(xylist[j][1] - xylist[i][1])
    l = dx + "|" + dy
    if dx == "0" and dy == "0":
      continue
    if l in dl:
      dl[l] = dl[l] + 1
    else:
      dl[l] = 1

cnt = 0
if len(dl) != 0:
  cnt = N - max(dl.values())

print(cnt if cnt > 1 else "1")
W, H, x, y = map(int,input().split())
hantei = 0
if (W%x == 0) and (H%y == 0):
    hantei = 1
print("{0} {1}".format(W*H/2, hantei))


### FIXED CODE ###

W, H, x, y = map(int,input().split())
hantei = 0
if (x != 0) and (y != 0):
    if (W/2 == x) and (H/2 == y):
        hantei = 1
print("{0} {1}".format(W*H/2, hantei))
h, w, d = [int(i) for i in input().split()]
a = [[int(j)-1 for j in input().split()] for i in range(h)]

q = int(input())#moving num
l = [0 for i in range(q)]#start number
r = [0 for i in range(q)]#finish number

for i in range(q):
    tmp = input().split()
    l[i]=int(tmp[0])-1
    r[i]=int(tmp[1])-1
loc = [[0, 0] for i in range(h*w)]
for i in range(h):
    for j in range(w):
        loc[a[i][j]][0] = i
        loc[a[i][j]][1] = j
#print(loc)
cost = [0 for i in range(int((h*w)/d))]
#print(cost)
for i in range(1, len(cost)):
    cost[i] += abs(loc[(i+1)*d-1][0]-loc[i*d-1][0])
    cost[i] += abs(loc[(i+1)*d-1][1]-loc[i*d-1][1])
#print(cost)
for i in range(1, len(cost)):
    cost[i] += cost[i-1]
print(cost)

for i in range(q):
    print(cost[int(r[i]/d)]-cost[int(l[i]/d)])


### FIXED CODE ###

import math
def func(h, w, d, a, query):
    imos = [0 for _ in range(h*w)]
    pos = [[0, 0] for _ in range(h*w)]
    for i in range(h):
        for j in range(w):
            pos[a[i][j]] = [i, j]
    for i in range(d):
        for j in range(math.ceil((h*w-i)/d)):
            if j == 0:
                continue
            else:
                imos[i + d * j] = imos[i + d * (j-1)]\
                                  + abs(pos[i + d * j][0] - pos[i + d * (j-1)][0])\
                                  + abs(pos[i + d * j][1] - pos[i + d * (j-1)][1])
    for i in range(len(query)):
        print(imos[query[i][1]] - imos[query[i][0]])
    return
h, w, d = [int(i) for i in input().split()]
a = [[0 for _ in range(w)] for _ in range(h)]
for i in range(h):
    a[i] = [int(i) - 1 for i in input().split()]
q = int(input())
query = [[0, 0] for _ in range(q)]
for i in range(q):
    query[i] = [int(i) - 1 for i in input().split()]
func(h, w, d, a, query)
"""
func(3, 3, 2, [[0, 3, 2], [1, 4, 6], [7, 8, 5]], [[3, 7]])
print("ans: 5\n")
func(4, 2, 3, [[2, 6], [0, 3], [4, 1], [5, 7]], [[1, 1], [1, 1]])
print("ans: 0, 0\n")
func(5, 5, 4, [[12, 24, 6, 14, 16], [15, 21, 19, 1, 8], [13, 10, 11, 0, 18], [9, 5, 22, 7, 17], [2, 20, 4, 23, 3]], [[12, 12], [1, 9], [12, 12]])
print("ans: 0, 5, 0")
"""
# print("func({}, {}, {}, {}, {})".format(h, w, d, a, query))
# coding: utf-8
# Here your code !
import sys
from collections import deque
n = int(input())
output = []
for i in range(n):
    order,data =input().split() 
    if order == "insert":
        output.append(int(data))
    elif order == "deleteFirst":
        output.pop()
    elif order == "deleteLast":
        output.popleft()

    elif order == "delete":
        try:
#            output.remove(int(data))
        except:
            pass
output.reverse()
print(" ".join(output))
#print(" ".join(map(str,output)))

### FIXED CODE ###

import sys
from collections import deque
n = int(sys.stdin.readline())
lines = sys.stdin.readlines()
 
Q = deque()
for i in range(n):
    command = lines[i].split()
    if command[0] == "insert":
        Q.appendleft(command[1])
    elif command[0] == "deleteFirst":
        Q.popleft()
    elif command[0] == "deleteLast":
        Q.pop()
    elif command[0] == "delete":
        try:
            Q.remove(command[1])
        except:
            pass
print(" ".join(Q))
n = int(input())
a = list([input() for i in range(n)])
z = 0
for i in range(n):
  a[i] = int(a[i])
  if a[i] > z:
    z = i+1

print(sum(a)-a[z]/2)

### FIXED CODE ###

n = int(input())
a = list([input() for i in range(n)])
z = 0
ax = 0
for i in range(n):
    a[i] = int(a[i])
    if a[i] > ax:
        z = i
        ax = a[i]
        
print(int(sum(a)-a[z]/2))
l,r=map(int,input().split())
if r-l>=3000: print(0)
else:
    min_mod=2018
    for i in range(l,r):
        for j in range(i+1,r+1):
            min_mod = min(min_mod, (i*j)%2019)
	print(min_mod)

### FIXED CODE ###

l,r=map(int,input().split())
mod=2019
if r-l>=2019: print(0)
else:
    res=2018 #2019の剰余なので最大でも2018
    for i in range(l,r):
        for j in range(i+1,r+1):
            res = min(res, (i*j)%mod)
    print(res)
input_num = int(input())

n_surplus = input_num % 1000

if n_surplus == 0:
  print(n_surplus)
  else:
    print(1000 - n_surplus)
    


### FIXED CODE ###

int_num = int(input())
n_surplus = int_num % 1000

if n_surplus == 0:
    print(0)
else:
    print(1000 - n_surplus)
N,K=map(int,input().split())
A=list(map(int,input().split()))
L=[]
A.sort()
A.append(200001)
for i in range(N):
  if A[i]==A[i+1] or i==N-1:
    continue
  else:
    x=A.count(A[i])
    L.append(x)
L.sort(reverse=True)
S=0
for i in range(K):
  S+=L[i]
print(N-S)

### FIXED CODE ###

from collections import Counter
N,K=map(int,input().split())
A=list(map(int,input().split()))
x=Counter(A)
l=x.most_common(K)
s=0
for i in range(len(l)):
  s+=l[i][1]
  
print(N-s)
import math
N=int(input())
l=[1]
for i in range(1,int(math.log(N,6))+1):
    l.append(6**i)
for i in range(1,int(math.log(N,9))+1):
    l.append(9**i)
l.sort()
dp=[math.inf for _ in range(N+1)]
dp[0] = 0
for i in range(len(l)):
    for j in range(l[i],N+1):
        dp[j] = min(dp[j],dp[j-l[i]]+1)
print(dp[-1])

### FIXED CODE ###

import math
N=int(input())
l=[1, 6, 9, 36, 81, 216, 729, 1296, 6561, 7776, 46656, 59049]
dp=[100000 for _ in range(N+1)]
dp[0] = 0
for i in l:
    if i > N:
        break
    for j in range(i,N+1):
        dp[j] = min(dp[j],dp[j-i]+1)
print(dp[-1])
import sys
H,W = map(int,input().split())
s = [list(input()) for _ in range(H)]
sys.setrecursionlimit(10**7)

flag = [[-1 for _ in range(W)] for _ in range(H)]
move = [(-1,0),(1,0),(0,-1),(0,1)]

def search(x,y):
  if x < 0 or H <= x or y < 0 or W <= y:
    return
  if s[x][y] == "." or flag[x][y] != -1:
    return
  flag[x][y] = 0
  s[x][y] = 0
  for (nx,ny) in move:
    wx, wy = x+nx, y+ny
    search(wx,wy)
  return 

check_1 = False
for i in range(H):
  for j in range(W):
    if s[i][j] == "#":
      sx, sy = i, j
      check_1 = True
      break
  if check_1:
    break
    
search(sx,sy)

check_2 = True
for i in range(H):
  for j in range(W):
    if s[i][j] == "#":
      check_2 = False
      
print("Yes" if check_2 else "No")

### FIXED CODE ###

H,W = map(int,input().split())
s = [list(input()) for _ in range(H)]

jougesayuu = [(-1,0),(1,0),(0,-1),(0,1)]

check = True
for i in range(H):
  for j in range(W):
    if s[i][j] == "#":
      flag = False
      for (n,m) in jougesayuu:
        ni, nj = i + n, j + m
        if ni < 0 or H <= ni or nj < 0 or W <= nj:
          continue
        if s[ni][nj] == "#":
          flag = True
      if not flag:
        check = False
        
print("Yes" if check else "No")
S = int(input())
h = S//3600
m = S%3600//60
s = S%60
print(h:m:s.split(:))



### FIXED CODE ###

S = int(input())
h = S//3600
m = S%3600//60
s = S%60
print(f"{h}:{m}:{s}")
# ABC 042: A – 和風いろはちゃんイージー / Iroha and Haiku (ABC Edition)
nums = [int(s) for s in input().split(" ")]
print("YES" if nums.count(5) == 2 and nums.count(7) == 1 else print("NO"))

### FIXED CODE ###

# ABC 042: A – 和風いろはちゃんイージー / Iroha and Haiku (ABC Edition)
nums = [int(s) for s in input().split(" ")]
print("YES" if nums.count(5) == 2 and nums.count(7) == 1 else "NO")
n = int(input())
r = int(input())
 
if r < 10:
  print(n-(100*(10-r)))
else:
  print(n)


### FIXED CODE ###

n,r = map(int,input().split())
 
if n < 10:
  print(r+(100*(10-n)))
else:
  print(r)
a=int(input());s=''
while a!=0:s+=str(a%2);a=-(a//2)
print(int(s[::-1]))

### FIXED CODE ###

a=int(input());s=''
while a!=0:s+=str(a%2);a=-(a//2)
print(int(s[::-1]) if s != '' else 0)
import math
import copy
from copy import deepcopy
import sys
import fractions
import numpy as np
from functools import reduce
# import statistics
import heapq


# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

data = getInputListInt()
N = data[0]
K = data[1]
MOD = 1000000000 + 7

c = np.empty((4005, 4005))

def init():
    c[0][0] = 1
    for i in range(4001):
        for j in range(0, i+1, 1):
            c[i+1][j] += c[i][j]
            c[i+1][j+1] += c[i][j]

def comb(n, k):
    return c[n][k]

def f2(n, k):
    return comb(n+k-1, k-1)

def f(n, k):
    if (n < k): return 0
    if(n == 0 and k == 0): return 1
    if(k < 1): return 0
    return f2(n-k, k)

init()

for i in range(1, K+1, 1):
    blue = f(K, i)
    red = f2(N-K-(i-1), i+1)

    ans = (blue * red) % MOD
    print(int(ans))


### FIXED CODE ###

import sys

# import re
import math
import collections
# import decimal
# import bisect
# import itertools
import fractions
# import functools
import copy
import heapq
import decimal
# import statistics
import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    def fast_pow(num, kata, mod):
        if kata == 0:
            return 0

        res = 1
        while kata > 0:
            if kata & 1 == 1:
                res = res * num % mod
            num = num * num % mod

            kata >>= 1
        return res

    # MODのCombination nがでかくても関係なくrに依存　r<10**6なら回せる
    MOD = 10 ** 9 + 7

    def choose(n, r):
        res = 1
        fac = 1
        for i in range(r):
            res *= n - i
            res %= MOD
            fac *= i + 1
            fac %= MOD
        return res * fast_pow(fac, MOD - 2, MOD) % MOD

    n, k = ns()

    for i in range(1, k + 1):
        blue_pair = choose(k - i + (i - 1), i - 1)
        red_pair = choose((n - k) + 1, i)
        print(blue_pair * red_pair % MOD)


if __name__ == '__main__':
    main()
first= input()
first = first.split()

N = int(first[0])
L =[]
for i in range(N)
  s = input()
  L.append(s)
  
L.sort()
for i in L:
  print(i,end="")



### FIXED CODE ###

first= input()
first = first.split()

N = int(first[0])
L =[]
for i in range(N):
  s = input()
  L.append(s)
  
L.sort()
for i in L:
  print(i,end="")
n,q = map(int,input().split())
s = input()
ans = []
for i in range(q):
    l,r = map(int,input().split())
    buf = s[l-1:r]
    print(buf)
    ans.append(buf.count('AC'))

for i in range(len(ans)):
    print(ans[i])


### FIXED CODE ###

n,q = map(int,input().split())
s = input()
ans = []
li = [0] * (len(s))
count = 0

for i in range(1,len(s)):
    if s[i] == 'C' and s[i-1] == 'A':
        count += 1
    li[i] = count

for i in range(q):
    l,r = map(int,input().split())
    tmp = li[r-1] - li[l-1]
    ans.append(tmp)

for aa in ans:
    print(aa)
import math
import fractions


def main():
    N = int(input())
    ans = int(input())
    for i in range(N-1):
        T = int(input())
        ans = (ans * T) / fractions.gcd(ans, T)  # 最小公倍数
        ans = int(ans)
    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import fractions


def main():
    N = int(input())
    ans = int(input())
    for i in range(N-1):
        T = int(input())
        ans = (ans * T) // fractions.gcd(ans, T)  # 最小公倍数
        ans = int(ans)
    print(ans)


if __name__ == "__main__":
    main()
A,B = map(int,input().split())
 
return(max([A+B, A-B, A*B]))

### FIXED CODE ###

A,B = map(int,input().split())

a1 = A + B
a2 = A - B
a3 = A * B

if a1 >= a2 and a1 >= a3:
	print(a1)
elif a2 >= a1 and a2>= a3:
	print(a2)
elif a3 >= a1 and a3 >= a2:
	print(a3)
if sum(A) > 21:
    print('bust')
else:
    print('win')


### FIXED CODE ###

A = [int(x) for x in input().split()]
if sum(A) > 21:
    print('bust')
else:
    print('win')
n = int(raw_input())
arr = map(int,raw_input().split())
dp = [float("inf")]*(n)
 
for i in range(n):
  for j in (i+1,i+2)
    if j < n:
      dp[j] = min(dp[j], dp[i]+abs(arr[i]-arr[j]))
print dp[n-1]

### FIXED CODE ###

n = int(raw_input())
arr = map(int,raw_input().split())
dp = [float("inf")]*(n)
dp[0]=0
for i in range(n):
    for j in [i+1,i+2]:
        if j < n: 
            dp[j] = min(dp[j], dp[i]+abs(arr[i]-arr[j]))
print dp[n-1]
def sakujo();
url1 = raw_input()
url2 = raw_input()

a, b = len(url1), len(url2)
x = [0 for i in range(b+1)]
for i in range(a):
e1 = url1[i]
y = x+[]
for j in range(b):
if e1 == url2[j]:
x[j+1] = y[j] + 1
elif x1[j+1] < x[j]:
x[j+1] = x[j]
return x[-1]


n=input()
for ix in range(n):
def sakujo

### FIXED CODE ###

def longest():
    alps1 = raw_input()
    alps2 = raw_input()
    
    x, y = len(alps1), len(alps2)
    k = [0 for i in range(y+1)]
    for i in range(x):
        e1 = alps1[i]
        l = k+[]
        for j in range(y):
            if e1 == alps2[j]:
                k[j+1] = l[j] + 1
            elif k[j+1] < k[j]:
                k[j+1] = k[j]
 
    return k[-1]
    
n = input()
for i in range(n):
    print longest()
n = int(input())
d = [[0]*10 for _ in range(n)]
ans = 0
for i in range(1, n+1):
    s = str(i)
    if s[0] == '0' or s[-1] == '0':
        continue
    d[int(s[0])][int(s[-1])] += 1
for i in range(1, 10):
    for j in range(1, 10):
        ans += d[i][j] * d[j][i]
print(ans)


### FIXED CODE ###

n = int(input())
d = [[0]*10 for _ in range(10)]
ans = 0
for i in range(1, n+1):
    s = str(i)
    if s[0] == '0' or s[-1] == '0':
        continue
    d[int(s[0])][int(s[-1])] += 1
for i in range(1, 10):
    for j in range(1, 10):
        ans += d[i][j] * d[j][i]
print(ans)
n=int(input())
X=[]
Y=[]
#A=[]
#for i in range(n):
A=int(input())
x=[]
y=[]
  #for j in range(A[i]):
x,y=[int(s) for s in input().split()]
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]):
   # 　　l[X[j][k]] *= 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)
import sys
from functools import lru_cache
def input(): return sys.stdin.readline().rstrip()

def calc(n):
    if n == 1:
        return 1
    else:
        return n + calc(n - 1)

def main():
    N, K = map(int, input().split())
    P = tuple(map(int, input().split()))

    l = 0
    sum_v = 0
    max_v = 0
    max_i = 0
    ind = 0
    for i in range(N-K+1):
        while l < K:
            sum_v += P[ind]
            ind += 1
            l += 1
        if sum_v > max_v:
            max_v = sum_v
            max_i = i
        l -= 1
        sum_v -= P[i]
    print(sum([calc(p) / p for p in P[max_i:max_i+K]]))

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
from functools import lru_cache
def input(): return sys.stdin.readline().rstrip()

sys.setrecursionlimit(10 ** 9)

@lru_cache(maxsize=None)
def calc(n):
    if n == 1:
        return 1
    else:
        return n + calc(n - 1)

def main():
    N, K = map(int, input().split())
    P = tuple(map(int, input().split()))

    l = 0
    sum_v = 0
    max_v = 0
    max_i = 0
    ind = 0
    for i in range(N-K+1):
        while l < K:
            sum_v += P[ind]
            ind += 1
            l += 1
        if sum_v > max_v:
            max_v = sum_v
            max_i = i
        l -= 1
        sum_v -= P[i]
    print(sum([calc(p) / p for p in P[max_i:max_i+K]]))

if __name__ == '__main__':
    main()
square=[]
for i in range(400):
  square.append(i*i)
a,b=int(input().split())
p=a*(10**len(str(b)))+b
if p in square:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

square=[]
for i in range(400):
  square.append(i*i)
a,b=map(int,input().split())
p=a*(10**len(str(b)))+b
if p in square:
  print('Yes')
else:
  print('No')
a, b, c = str(input().split())
print(a[0], b[0], c[0])


### FIXED CODE ###

[print(i[0], end="") for i in input().split()]
print()
n,k = map(int,input().split())
output = []

for i in range(k):
  d = int(input())
  for j in range(d):
    output.append(int(input()))

print(n - len(set(output)))

### FIXED CODE ###

n,k = map(int,input().split())
ans = [1]*n

for i in range(k):
  d = int(input())
  for j in list(map(int,input().split())):
    ans[j-1] = 0

print(ans.count(1))
import sympy

a,b,c=map(int, input().split())
print('Yes' if sympy.sqrt(a) + sympy.sqrt(b) < sympy.sqrt(c) else 'No')

### FIXED CODE ###

a,b,c=map(int, input().split())
print('Yes' if (c-a-b)>0 and 4*a*b < (c-a-b)**2 else 'No')
n = int(input())
rate = list(map(int,input().split()))
ratecolor = 0
free = 0
ratecolor = 0
color = [0]*9
for i in range(n):
    for j in range(13):
        if(rate[i] < j*400 + 400):
            if(rate[i] >= 3200):
                free += 1
                break
            if(color[j] == 0 and rate[i] < 3200):
                color[j] += 1
                ratecolor += 1
                break

print(ratecolor if ratecolor != 0 else 1,ratecolor+free)



### FIXED CODE ###

n = int(input())
rate = list(map(int,input().split()))
ratecolor = 0
free = 0
ratecolor = 0
color = [0]*9
for i in range(n):
    if(rate[i] >= 3200):
        free += 1
    else:
        for j in range(9):
            if(rate[i] < j*400 + 400):
                if(color[j] == 0):
                    color[j] += 1
                    ratecolor += 1
                break
print(ratecolor if ratecolor != 0 else 1,ratecolor+free)
N, K = map(int, input().split())
S = [str(_) for _ in input().split()]

if (S[K] == 'A'):
	S[K] = 'a'
elif (S[K] == 'B'):
    S[K] = 'b'
else:
	S[K] = 'c'
    
printf(S)

### FIXED CODE ###

N, K = map(int, input().split())
S = list(str(input()))

if (S[K-1] == 'A'):
  S[K-1] = 'a'
elif (S[K-1] == 'B'):
  S[K-1] = 'b'
elif (S[K-1] == 'C'):
  S[K-1] = 'c'
  
ans = ''.join(S)
    
print(ans)
a = map(int,input())
b=a%10
c=(a-b)/10
judg="Good"
for i in range(4):
    if b==c%10:
        judg="Bad"
    else:
        b=c%10
        c=(c-b)/10
print(judg)

### FIXED CODE ###

a=int(input())
b=a%10
c=(a-b)/10
judg="Good"
for i in range(3):
    if b==c%10:
        judg="Bad"
    else:
        b=c%10
        c=(c-b)/10
print(judg)
N = int(input())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]
 
t = 0
for i in B:
  t = t + i
  
y = []
for x in ramnge(len(A)):
  if A[x] + 1 == A[x+1]:
    y.append(x)
 
 
for k in range(len(y)):
  t = t + C[k]
print(t)

### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]
 
t = 0
for i in B:
  t = t + i
  
y = []
for x in range(len(A)-1):
  if A[x] + 1 == A[x+1]:
    y.append(A[x]-1)
  else:
    pass
for k in y:
  t = t + C[k]
print(t)
N = int(input())
H_inp = input()
H = H_inp.split(" ")

for i in range(N):
    H[i] = int(H[i])

now        = H[0]
max_move   = 0
move_count = 0

for j in range(N):
    if now >= H[j+1]:
        move_count = move_count + 1
    else:
        if move_count > max_move:
            max_move = move_count
            move_count = 0

    if j == N-2:
        if move_count > max_move:
            max_move = move_count
            move_count = 0
        break
    
    now = H[j+1]

print(max_move)


### FIXED CODE ###

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

ans   = 0
count = 0


for j in range(N):
    if N == 1:
       break
 
    if H[j] >= H[j+1]:
        count += 1
    else:
        ans   = max(count, ans)
        count = 0
 
    if j == N-2:
        if count > ans:
            ans   = count
        break

print(ans)
import sys

sys.setrecursionlimit(10000)

n, m = map(int, input().split())
broken = []
for i in range(m):
    broken.append(int(input()))
    if len(broken) > 1 and broken[-2] + 1 == broken[-1]:
        print(0)
        exit()
    

dp = [-float('inf')] * (n + 1)

def rec(i):
    global dp
    if dp[i] > -float('inf'):
        return dp[i]
      
    if i in broken:
        return 0
    
    if i >= n - 1:
        return 1
    
    dp[i] = rec(i + 1) + rec(i + 2)
    
    return dp[i]
            
print(rec(0)%1000000007)


### FIXED CODE ###

n,m = map(int,input().split())
broken = [True] * (n+1)
for _ in range(m):
    broken[int(input())] = False

mod = 10 ** 9 + 7

dp = [0] * (n+1)
dp[-1] = 1
if broken[n-1]:
    dp[n-1] = 1

for i in reversed(range(n-1)):
    if broken[i]:
        dp[i] = (dp[i+1] + dp[i+2]) % mod
        
print(dp[0])