Harryxun/stf_run huggingface dataset:
import sys
import numpy as np

x = []
i = 0
for line in sys.stdin:
    if i==0:
        lx = int(line)
    else:
        x.append([int(i) for i in line.split()])
    i = 1

rooms = np.zeros((4,3,10), dtype = int)
for e in x:
    i,j,k,l = e
    rooms[i-1][j-1][k-1] += l

for i in range(4):
    for j in range(3):
        for k in range(10):
            print rooms[i][j][k],
        print
    if i<3: print '#' * 20

### FIXED CODE ###

rb = range(4)
rf = range(3)
rr = range(10)
rooms = [[[0 for i in rr] for j in rf]for k in rb]

lx = int(raw_input())
for i in range(lx):
    b,f,r,v = map(int, raw_input().split())
    rooms[b-1][f-1][r-1] += v

for i in rb:
    for j in rf:
        print '',
        for k in rr:
            print rooms[i][j][k],
        print
    if i < len(rb)-1:
        print '#' * 20
r=input()
print(3*r*r)

### FIXED CODE ###

r=int(input())
print(3*r*r)
K = int(input())
S = input()
x = len(S)
 
if x <= K:
  print(S)
else:
  print(S[K - 1:]　+ '...')

### FIXED CODE ###

K = int(input())
S = input()
x = len(S)
 
if x <= K:
    print(S)
else:
    print(S[:K] + '...')
ab = input().split(" ")
a = int(ab[0])
b = int(ab[1])


def check(a,b):
	if (a>9 or b>9):
		return -1
	else
		return a*b

print(check(a,b))


### FIXED CODE ###

ab = input().split(" ")
a = int(ab[0])
b = int(ab[1])


def check(a,b):
	if (a>9 or b>9):
		return -1
	else:
		return a*b
ans = check(a,b)
print(ans)
a=[0]*26
w='abcdefghijklmnopqrstuvwxyz'
s=list(input().upper())
for i in s:
    if i=='A':
        a[0]+=1
    elif i=='B':
        a[1]+=1
    elif i=='C':
        a[2]+=1
    elif i=='D':
        a[3]+=1
    elif i=='E':
        a[4]+=1
    elif i=='F':
        a[5]+=1
    elif i=='G':
        a[6]+=1
    elif i=='H':
        a[7]+=1
    elif i=='I':
        a[8]+=1
    elif i=='J':
        a[9]+=1
    elif i=='K':
        a[10]+=1
    elif i=='L':
        a[11]+=1
    elif i=='M':
        a[12]+=1
    elif i=='N':
        a[13]+=1
    elif i=='O':
        a[14]+=1
    elif i=='P':
        a[15]+=1
    elif i=='Q':
        a[16]+=1
    elif i=='R':
        a[17]+=1
    elif i=='S':
        a[18]+=1
    elif i=='T':
        a[19]+=1
    elif i=='U':
        a[20]+=1
    elif i=='V':
        a[21]+=1
    elif i=='W':
        a[22]+=1
    elif i=='X':
        a[23]+=1
    elif i=='Y':
        a[24]+=1
    elif i=='Z':
        a[25]+=1 
for i in range(26):
    print('w[i:i+1], ':', str(a[i]))

### FIXED CODE ###

a=[0]*26
w='abcdefghijklmnopqrstuvwxyz'
try:
    while True:
        s=list(raw_input().upper())
        for i in s:
            if i=='A':
                a[0]+=1
            elif i=='B':
                a[1]+=1
            elif i=='C':
                a[2]+=1
            elif i=='D':
                a[3]+=1
            elif i=='E':
                a[4]+=1
            elif i=='F':
                a[5]+=1
            elif i=='G':
                a[6]+=1
            elif i=='H':
                a[7]+=1
            elif i=='I':
                a[8]+=1
            elif i=='J':
                a[9]+=1
            elif i=='K':
                a[10]+=1
            elif i=='L':
                a[11]+=1
            elif i=='M':
                a[12]+=1
            elif i=='N':
                a[13]+=1
            elif i=='O':
                a[14]+=1
            elif i=='P':
                a[15]+=1
            elif i=='Q':
                a[16]+=1
            elif i=='R':
                a[17]+=1
            elif i=='S':
                a[18]+=1
            elif i=='T':
                a[19]+=1
            elif i=='U':
                a[20]+=1
            elif i=='V':
                a[21]+=1
            elif i=='W':
                a[22]+=1
            elif i=='X':
                a[23]+=1
            elif i=='Y':
                a[24]+=1
            elif i=='Z':
                a[25]+=1 

except EOFError:
    pass

for i in range(26):
    print w[i:i+1], ':', str(a[i])
N = int(input())

Li_2 = 2
Li_1 = 1

for i in range(N-1):
    Li = Li_2 + Li_1
    Li_2 = Li_1
    Li_1 = Li
print(Li)

### FIXED CODE ###

N = int(input())

Li_2 = 2
Li_1 = 1
Li = Li_2 + Li_1
for i in range(N-1):
    Li = Li_2 + Li_1
    Li_2 = Li_1
    Li_1 = Li

if N == 1:
  print(1)
else:
  print(Li)
# -*- coding: utf-8 -*-
import numpy as np

n, k = map(int, input().split())
a = np.zeros(n)

for i in range(k):
    d = input()
    temp = input()

    for j in range(int(d)):
        a[int(temp[j*2]) - 1] = 1

count = 0
for i in range(n):
    if a[i] == 0:
        count = count + 1

print(count)


### FIXED CODE ###

# -*- coding: utf-8 -*-
import numpy as np

n, k = map(int, input().split())
a = np.zeros(n)

for i in range(k):
    d = input()
    temp = input()

    for j in range(int(d)):
        a[int(temp.split(' ')[j]) - 1] = 1

count = 0
for i in range(n):
    if a[i] == 0:
        count = count + 1

print(count)
A, B = input().split()
return (A*3 + B)//2

### FIXED CODE ###

A,P = map(int,input().split())
print((3*A+P)//2)
from operator import itemgetter

def eratosthenes(n):
    table = [True] * (n + 1)
    table[0] = table[1] = True
    for i in range(2, int(round(pow(n, 0.5)))):
        if not table[i]:
            continue
        for j in range(i + i, n, i):
            table[j] = False
    return table

if __name__ == "__main__":
    N = int(input())
    f = itemgetter(*[int(input()) for _ in range(N)])
    print(sum(f(eratosthenes(10000))))

### FIXED CODE ###

from random import randrange


def eratosthenes(size):
    table = [True] * (size + 1)
    table[0] = table[1] = True
    for i in range(2, int(round(pow(size+1, 0.5)))):
        if not table[i]:
            continue
        for j in range(i + i, size+1, i):
            table[j] = False
    return table


def miller_rabin(n, k=20):
    if n == 2:
        return True
    if n == 1 or n % 2 == 0:
        return False
    d = n - 1
    while d & 1 == 0:
        d >>= 1
    for _ in range(k):
        a = randrange(1, n)
        y = pow(a, d, n)
        t = d
        while t != n - 1 and y != 1 and y != n - 1:
            y = pow(y, 2, n)
            t <<= 1
        if y != n - 1 and (t & 1) == 0:
            return False
    return True

if __name__ == "__main__":
    N = int(input())
    print(sum(map(miller_rabin, [int(input()) for _ in range(N)])))
#!/usr/bin/env python3
import sys

inf = float('inf')

def solve(H: int, W: int, A: "List[str]"):
    dist = [[inf] * W for h in range(H)]
    for h in range(1, H):
        for w in range(1, W):
            if A[h][w] == '#':
                dist[h][w] = 0
            else:
                dist[h][w] = min(dist[h-1][w], dist[h][w-1]) + 1
    
    dmax = 0
    for h in range(H-1, -1, -1):
        for w in range(W-1, -1, -1):
            if A[h][w] == '#':
                dist[h][w] = 0
            elif h+1 <= H-1 and w+1 <= W-1:
                dist[h][w] = min(dist[h][w], min(dist[h+1][w], dist[h][w+1]) + 1)
            elif w+1 == W and h+1 <= H-1:
                dist[h][w] = min(dist[h][w], dist[h+1][w] + 1)
            elif h+1 == H and w+1 <= W-1:
                dist[h][w] = min(dist[h][w], dist[h][w+1] + 1)
            dmax = max(dist[h][w], dmax)
    print(dmax) 
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    A = [ next(tokens) for _ in range(W) ]  # type: "List[str]"
    solve(H, W, A)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys

inf = float('inf')

def solve(H: int, W: int, A: "List[str]"):
    dist = [[inf] * W for h in range(H)]
    for h in range(1, H):
        for w in range(1, W):
            if A[h][w] == '#':
                dist[h][w] = 0
            else:
                dist[h][w] = min(dist[h-1][w], dist[h][w-1]) + 1
    
    dmax = 0
    for h in range(H-1, -1, -1):
        for w in range(W-1, -1, -1):
            if A[h][w] == '#':
                dist[h][w] = 0
            elif h+1 <= H-1 and w+1 <= W-1:
                dist[h][w] = min(dist[h][w], min(dist[h+1][w], dist[h][w+1]) + 1)
            elif w+1 == W and h+1 <= H-1:
                dist[h][w] = min(dist[h][w], dist[h+1][w] + 1)
            elif h+1 == H and w+1 <= W-1:
                dist[h][w] = min(dist[h][w], dist[h][w+1] + 1)
            dmax = max(dist[h][w], dmax)
    print(dmax) 
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    A = [ next(tokens) for _ in range(H) ]  # type: "List[str]"
    solve(H, W, A)

if __name__ == '__main__':
    main()
n = int(input())
lis = list(map(int,input().split()))
num = [0 for i in range(n)]
for nn in lis:
  num[nn-1] += 1
ans = 0
for nnn in num:
  ans += (nnn*(nnn-1))//2
for i in range(n):
  print(ans-(num[lis[i]]*(num[lis[i]]-1))//2+((num[lis[i]]-1)*(num[lis[i]]-2))//2)

### FIXED CODE ###

n = int(input())
lis = list(map(int,input().split()))
num = [0 for i in range(n+1)]
for nn in lis:
  num[nn] += 1
ans = 0
for nnn in num:
  ans += (nnn*(nnn-1))//2
for i in range(n):
  print(ans-(num[lis[i]]*(num[lis[i]]-1))//2+((num[lis[i]]-1)*(num[lis[i]]-2))//2)
A,B,C = map(int, input().split())
 
if A+B+C>=22:
      print("bust")
else:
      prit("win")

### FIXED CODE ###

A,B,C = map(int, input().split())
 
if A+B+C>=22:
      print("bust")
else:
      print("win")
import math
def main():
    K=int(input())
    (A,B)=[int(x) for x in input().split()]
    if A % K == 0:
        print('OK')
        exit(0)
    elif math.ceil(A/K)*K <= B:
        print('OK')
        exit(0)
    else:
        print('NG')
        exit(-1)

if __name__ == '__main__':
    main()

### FIXED CODE ###

import math

def main():
    K=int(input())
    (A,B)=[int(x) for x in input().strip().split()]
    if A % K == 0:
        print('OK')
    elif math.ceil(A/K)*K <= B:
        print('OK')
    else:
        print('NG')
 
if __name__ == '__main__':
    main()
import fractions
n,m=map(int,input().split())
s=list(input())
t=list(input())
if s[0]!=t[0]:
    print(-1)
    exit()
p=n*m//fractions.gcd(n,m)
sf=p//n
tf=p//m
for i in range(1,p):
    if i%n==i%m==0:
        if s[i//m]!=t[i//n]:
        print(-1)
        exit()
print(p)


### FIXED CODE ###

import fractions
N, M = map(int, input().split())
S = input()
T = input()
ans = (N * M) // fractions.gcd(N, M)
n = N // fractions.gcd(N, M)
m = M // fractions.gcd(N, M)
for i in range(min(N // n, M // m)):
    tmpn = S[n * i]
    tmpm = T[m * i]
    if tmpn != tmpm:
        ans = -1
        break

print(ans)
a=input()
m=a.split()
N,M=map(int,m)
if N==M:
  print 'Yes'
else:
  print 'No'


### FIXED CODE ###

a=raw_input()
m=a.split()
N,M=map(int,m)
if N==M:
  print 'Yes'
else:
  print 'No'
n, x = map(int, input().split())
l = list(map(int, input().split()))
print(1+sum(i <= x for i in [sum(l[0:i+1]) for i in range(n)]))

### FIXED CODE ###

X, A = map(int, input().split())
print(["10", "0"][X < A])
n, K = map(int, input().split())
heights = list(map(int, input().split()))
dp = [float('inf') for i in range(n)]
dp[0] = 0

for i in range(1, n):

    dp[i] = min(dp[i], dp[i - 1] + abs(heights[i] - heights[i - 1]))
    if i > 1:
        for k in range(1, K + 1):
            dp[i] = min(dp[i], dp[i - k] + abs(heights[i] - heights[i - k]))

print(dp[n - 1])

### FIXED CODE ###

n = int(input())
heights = list(map(int, input().split()))
dp = [float('inf') for i in range(n)]
dp[0] = 0

for i in range(1, n):
    dp[i] = min(dp[i], dp[i - 1] + abs(heights[i] - heights[i - 1]))
    if i > 1:
        dp[i] = min(dp[i], dp[i - 2] + abs(heights[i] - heights[i - 2]))

print(dp[n - 1])
N=int(input())
print(a+a*a+a*a*a)

### FIXED CODE ###

N=int(input())
print(N+N**2+N**3)
import numpy as np

H, W, M = map(int, input().split())
h = [0 for i in range(H)]
w = [0 for i in range(W)]
DP = np.zeros((H, W))

for i in range(M):
    hh, ww = map(int, input().split())
    h[hh - 1] += 1
    w[ww - 1] += 1
    DP[hh - 1][ww - 1] = 1

hhh = max(h)
www = max(w)
hhhh = [i for i, x in enumerate(h) if x == hhh]
wwww = [i for i, x in enumerate(w) if x == www]
check = 0

for i in hhhh:
    for j in wwww:
        if DP[i][j] == 0:
            check = 1
            break
print(hhh + www - (1 - check))


### FIXED CODE ###

H, W, M = map(int, input().split())
h = [0 for i in range(H)]
w = [0 for i in range(W)]
DP = set()
for i in range(M):
    hh, ww = map(int, input().split())
    h[hh - 1] += 1
    w[ww - 1] += 1
    DP.add((hh - 1, ww - 1))

hhh = max(h)
www = max(w)
hhhh = [i for i, x in enumerate(h) if x == hhh]
wwww = [i for i, x in enumerate(w) if x == www]
check = 0

for i in hhhh:
    for j in wwww:
        if (i, j) not in DP:
            print(hhh + www)
            exit()
print(hhh + www - 1)
import math
n=int(input())
a=list(map(int,input().split()))

ra=list(reversed(a))

left=[]
right=[]
right.append(ra[0])
left.append(a[0])

if n>2:
  left.append(math.gcd(a[0],a[1]))
  for i in range(2,n-1):
    k=math.gcd(k,a[i])
    left.append(k)

  right.append(math.gcd(ra[0],ra[1]))
  for i in range(2,n-1):
    k=math.gcd(k,ra[i])
    right.append(k)

  ans=[right[-1]]
  for i in range(1,n-1):
    ans.append(math.gcd(left[i-1],right[len(right)-i-1]))
  ans.append(left[-1])
  print(max(ans))
else:
  print(max(ra[0],a[0]))

### FIXED CODE ###

import math
n=int(input())
a = list(map(int,input().split()))
a.sort()
lr=[0]*n
rl=[0]*n

for i in range(n):
  if i==0:
    g=a[0]
    lr[0]=g
  else:
    g=math.gcd(a[i],g)
    lr[i]=g
    
for i in range(n-1,0,-1):
  if n-1==i:
    g=a[n-1]
    rl[n-1]=g
  else:
    g=math.gcd(a[i],g)
    rl[i]=g  
hantei=0
ans=0
#print(lr)
#print(rl)
for i in range(n):
  if i==0:
    hantei=rl[1]
  elif i==n-1:
    hantei=lr[n-2]
  else:
    hantei=math.gcd(lr[i-1],rl[i+1])
  if ans<=hantei:
    ans=hantei
    
print(ans)
def sol():
    from collections import deque
    import sys
    input=sys.stdin.readline
    n=int(input())
    a=[deque() for i in range(n)]
    for i in range(n):
        for j in input().split():
            a[i].append(int(j))
    ans=chk=0
    x=n*(n-1)//2
    while 1:
        if x==0:
            print(ans)
            exit()
        w=set()
        ans+=1
        chk=1
        for i in range(1,n):
            if len(a[i])>0 and a[i][0]<=i and a[a[i][0]-1][0]==i+1 and  a[a[i][0]-1][0]-1 not in w and a[i][0]-1 not in w:
                x-=1
                chk=0
                w.add(a[a[i][0]-1][0]-1)
                w.add(a[i][0]-1)
                a[a[i][0]-1].popleft()
                a[i].popleft()
        if n==1000 and x+1==n*(n-1)//2:
            print(-1)
            eixt()
        if chk:
            print(-1)
            exit()

if __name__=="__main__":
    sol()


### FIXED CODE ###

def sol():
    from collections import deque
    import sys
    input=sys.stdin.readline
    n=int(input())
    a=[deque() for i in range(n)]
    for i in range(n):
        for j in input().split():
            a[i].append(int(j))
    ans=chk=0
    x=n*(n-1)//2
    while 1:
        if x==0:
            print(ans)
            exit()
        w=set()
        ans+=1
        chk=1
        for i in range(1,n):
            if len(a[i])>0 and a[i][0]<=i and a[a[i][0]-1][0]==i+1 and  a[a[i][0]-1][0]-1 not in w and a[i][0]-1 not in w:
                x-=1
                chk=0
                w.add(a[a[i][0]-1][0]-1)
                w.add(a[i][0]-1)
                a[a[i][0]-1].popleft()
                a[i].popleft()
        if n==1000 and x+1==n*(n-1)//2:
            print(x+1)
            exit()
        if chk:
            print(-1)
            exit()

if __name__=="__main__":
    sol()
N,A=map(int.input().split())
if N%500<=A:
  print ("Yes")
else:
  print("No")

### FIXED CODE ###

a = int(input())
n = int(input())
if((a%500)<=n):
  print("Yes")
else:
  print("No")
n = int(input())
a=list(map(int,input().split(' ')))
mod = 10**9+7
ans = 1
color=[1,0,0]
g = 0
for i in a[1:]:
    cnt = 0
    for n,j in enumerate(color):
        if i==0 and j ==0:
            color[n]+=1
            cnt = 1
            break
        elif i==j:
            cnt += 1
            if cnt == 1:
                color[n]+=1
    ans *= cnt
    ans %= mod
for i in color:
    if i >0:
        g += 1
if g ==1:
    print(ans*3%mod)
else:
    print(ans*6%mod)

### FIXED CODE ###

M_1,D_1 = map(int,input().split())
M_2,D_2 = map(int,input().split())
if M_1 != M_2:
  print(1)
else:
  print(0)
N=int(input())
if N%9==0:
    print(Yes)
else:
    print(No)

### FIXED CODE ###

def digitSum(n):
    s = str(n)
    array = list(map(int, s))
    return sum(array)
N = int(input())
if digitSum(N) % 9 == 0:
    print("Yes")
else:
    print("No")
a, b = input().split()

if a=H and b=H:print('H')
elif a=D and b=D:print('H')
else:print('D')

### FIXED CODE ###

a, b = input().split()

if a=='H' and b=='H':print('H')
elif a=='D' and b=='D':print('H')
else:print('D')
n = list(map(int,input().split()))
if 5 in n :
    n.remove(5)
    elif 5 in n :
        elif 7 in n :
                print("YES")
else :
    print("NO")

### FIXED CODE ###

n = list(map(int,input().split()))
if 5 in n:
    n.remove(5)
    if 5 in n and 7 in n :
        print("YES")
    else:
        print("NO")
else:
    print("NO")
S = input()

count0, count1 = 0, 0
val = []
for i in range(len(S)):
    if S[i] == '<':
        count0 += 1
        if count1 != 0:
            val.append(count1)
        if i == len(S)-1:
            val.append(count0)
        count1 = 0
    else:
        count1 += 1
        if count0 != 0:
            val.append(count0)
        if i == len(S)-1:
            val.append(count1)
        count0 = 0

ans = 0
for i in range(0, len(val)-1, 2):
    a = max(val[i], val[i+1])
    b = min(val[i], val[i+1])
    ans += a*(a+1)/2 + (b-1)*b/2
if len(val) % 2 == 1:
    a = max(val[-2], val[-1])
    #b = min(val[i], val[i+1])
    ans += a*(a+1)/2 #+ (b-1)*b/2    
print(int(ans))


### FIXED CODE ###

s = input()
num = len(s)
a = [0]*(num+1)

for i in range(num):
    if s[i] is '<':
        a[i+1] = max(a[i+1], a[i]+1)

for i in range(1, num+1):
    if s[-i] is '>':
        a[-(i+1)] = max(a[-(i+1)], a[-i]+1)
print(sum(a))
import sys

def main():
  input = sys.stdin.readline
  N, M = map(int, input().split())
  A = list(map(int, input().split()))
  d = {1: 2, 2: 5, 3: 5, 4: 4, 5: 5, 6: 6, 7: 3, 8: 7, 9: 6}
  
  dp = [0 for _ in range(N+1)]
  for i in range(1, N+1):
    dpi = - float('inf')
    for a in A:
      if i % d[a] == 0:
        dpi = max(dpi, i // d[a])
      elif d[a] <= i:
        dpi = max(dpi, dp[i - d[a]] + 1)
    dp[i] = dpi

  ans = [0 for _ in range(dp[N])]
  for i in range(len(ans)):
    num = 0
    for a in A:
      if dp[N - d[a]] == dp[N] - 1:
        num = max(num, a)
    ans[i] = str(num)
    N -= d[num]

  print(''.join(ans))


if __name__ == '__main__':
  main()

### FIXED CODE ###

import sys

def main():
  input = sys.stdin.readline
  N, M = map(int, input().split())
  A = list(map(int, input().split()))
  d = {1: 2, 2: 5, 3: 5, 4: 4, 5: 5, 6: 6, 7: 3, 8: 7, 9: 6}
  
  dp = [0 for _ in range(N+1)]
  for i in range(1, N+1):
    dpi = - float('inf')
    for a in A:
      if d[a] <= i:
        dpi = max(dpi, dp[i - d[a]] + 1)
    dp[i] = dpi

  ans = [0 for _ in range(dp[N])]
  for i in range(len(ans)):
    num = 0
    for a in A:
      if (d[a] <= N) and (dp[N - d[a]] == dp[N] - 1):
        num = max(num, a)
    ans[i] = str(num)
    N -= d[num]

  print(''.join(ans))


if __name__ == '__main__':
  main()
import math
import collections

n = int(input())
d = list(map(int,input().split()))
MOD = 998244353
  
#同じ長さの位置に何個頂点があるか
cnt = dict(collections.Counter(d))
#print(cnt)
if cnt[0]!=1:
  print(0)
  exit()
  
ans = 1
for i in range(len(dict(cnt))-1):
  val_1 = cnt[i]
  val_2 = cnt[i+1]
  ans *= (val_1**val_2)%MOD

print(ans%MOD)

### FIXED CODE ###

import collections
 
n = int(input())
d = list(map(int,input().split()))
MOD = 998244353
#頂点1が0でないとだめ
if d[0]!=0:
  print(0)
  exit()
  
#同じ長さの位置に何個頂点があるか
cnt = dict(collections.Counter(d))
#頂点1だけが0じゃないとだめ
if cnt[0]==1:
  m = max(cnt)
  #一番大きい数字までにちゃんとすべての数字が揃ってないとだめ
  for i in range(m):
    if i not in cnt:
      print(0)
      exit()
  ans = 1
  for i in range(m):
    val_1 = cnt[i]
    val_2 = cnt[i+1]
    ans *= (val_1**val_2)%MOD
 
  print(ans%MOD)
else:
  print(0)
import math
r = float(input())
s = r * r * math.pi
l = r * 2 * math.pi
print('%.5f %.5f' % (s, l))(a, b) 

### FIXED CODE ###

import math
r = float(input())
s = r * r * math.pi
l = r * 2 * math.pi
print('%.5f %.5f' % (s, l))
n,k,x,y=map(int,input().split())

if n>k:
  print(k*x+(n-k)*y)

else:
  print(k*x)
      

### FIXED CODE ###

n = int(input())
k = int(input())
x= int(input())
y= int(input())

if n>k:
  print(k*x+(n-k)*y)

else:
  print(n*x)
from collections import deque

n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]
t = []
s = set()
q = deque()

a, b = ab[0]
q.append(a)
lt = set

while len(q) != 0:
    x = q.popleft()
    s.add(x)
    tt = {x}
    tmp = []
    #print(x)
    #print(ab)
    for a, b in ab:
        if a in tt and b not in s:
            tt.add(b)
            s.add(b)
        elif b in tt and a not in s:
            tt.add(a)
            s.add(a)
        elif a not in tt and b not in tt:
            if a not in q:
                q.append(a)
                tmp.append([a, b])
    ab = tmp
    #print(q)
    t.append(tt)
#print(t)
ans = 0
for tt in t:
    ans = max(ans, len(tt))
print(ans)


### FIXED CODE ###

from collections import deque
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]
t = dict()
for i in range(1, n+1):
    t[i] = set()
for a, b in ab:
    t[a].add(b)
    t[b].add(a)

q = deque()
s = set()
ans = 0
for i in range(1, n+1):
    if i not in s:
        q.append(i)
        s.add(i)
        tmp = [i]
        while q:
            v = q.popleft()
            for ti in t[v]:
                if ti not in s:
                    tmp.append(ti)
                    q.append(ti)
                    s.add(ti)
    ans = max(ans, len(tmp))
print(ans)
import sys
a, b, c = map(int, raw_input().split())
i=0
while 1:
  c = a*c - b
  print c
  i = i + 1
  if i > 9 :
      sys.exit()


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
# スペース区切りの整数の入力
a, b = map(int, raw_input().split())
# 文字列の入力

if a < 6:
  result = b/2
  print 0
  sys.exit()

if 6 <= a and a <= 12 :
  result = b/2
  print result
  sys.exit()
result = b
print result