Harryxun/stf_run huggingface dataset:
import sys
input = sys.stdin.readline
from collections import Counter


def read():
    N, K = map(int, input().strip().split())
    G = [[] for i in range(N+1)]
    for i in range(N-1):
        a, b = map(int, input().strip().split())
        G[a-1].append(b-1)
        G[b-1].append(a-1)
    return N, K, G


def permute_init(n, MOD):
    factorial = [1 for i in range(n+1)]
    for i in range(1, n+1):
        factorial[i] = factorial[i-1] * i
        factorial[i] %= MOD
    return factorial


def permute(n, r, factorial, MOD):
    """nPr = n! / (n-r)!"""
    if n < 0 or r < 0 or n < r:
        return 0
    return factorial[n] * pow(factorial[n-r], MOD-2, MOD) % MOD


def solve(N, K, G, MOD=10**9+7):
    factorial = permute_init(10**5+1, MOD)

    visited = [False for i in range(N)]
    
    def dfs(a=0):
        f = 1
        if a == 0:
            f = permute(K-1, len(G[a]), factorial, MOD)
        else:
            f = permute(K-2, len(G[a])-1, factorial, MOD)
        for b in G[a]:
            if not visited[b]:
                visited[b] = True
                f *= dfs(b)
                f %= MOD
        return f
    
    visited[0] = True
    ans = K * dfs(0) % MOD

    return ans


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)


def read():
    N, K = map(int, input().strip().split())
    G = [[] for i in range(N+1)]
    for i in range(N-1):
        a, b = map(int, input().strip().split())
        G[a-1].append(b-1)
        G[b-1].append(a-1)
    return N, K, G


def permute_init(n, MOD):
    factorial = [1 for i in range(n+1)]
    for i in range(1, n+1):
        factorial[i] = factorial[i-1] * i
        factorial[i] %= MOD
    return factorial


def permute(n, r, factorial, MOD):
    """nPr = n! / (n-r)!"""
    if n < 0 or r < 0 or n < r:
        return 0
    return factorial[n] * pow(factorial[n-r], MOD-2, MOD) % MOD


def solve(N, K, G, MOD=10**9+7):
    factorial = permute_init(K, MOD)

    visited = [False for i in range(N)]
    
    def dfs(a=0):
        f = 1
        if a == 0:
            f = permute(K-1, len(G[a]), factorial, MOD)
        else:
            f = permute(K-2, len(G[a])-1, factorial, MOD)
        for b in G[a]:
            if not visited[b]:
                visited[b] = True
                f *= dfs(b)
                f %= MOD
        return f
    
    visited[0] = True
    ans = K * dfs(0) % MOD

    return ans


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))
import numpy as np

L, R = map(int, input().split())

tmp = 0
ans = 2019

i = L
j = R
tmp = (i * j) % 2019
if tmp < ans:
	ans = tmp
if (L + 2019 - L%2019) + 1 <= R:
	i =  L + 2019 - L % 2019
	j = i+1
	tmp = (i * j) % 2019
		if tmp < ans:
			ans = tmp

i = L
j = i+1
tmp = (i * j) % 2019
if tmp < ans:
	ans = tmp

j = R
i = j-1
tmp = (i * j) % 2019
if tmp < ans:
	ans = tmp

i = L
j = R
tmp = (i * j) % 2019
if tmp < ans:
	ans = tmp

print(ans)


### FIXED CODE ###

l,r = map(int,input().split())
ans = 2019
mod = 2019
 
for i in range(l,r):
  for j in range(i+1,r+1):
    ans = min(ans,(i*j)%mod)
    if ans == 0:
      print(0)
      exit()
print(ans)
n,k=map(int,input().split())
a=list(map(int, input().split()))
b=[1]
ba={1}
c=0
m=0
# while flag==1:
for i in range(n):
    if a[m] not in ba:
        b.append(a[m])
        ba.add(a[m])
        c+=1
        m=a[m]-1
    else:
        e=a[m]
        break
# print(b,e,c+1)
e=b.index(e)
# print(b,e)
b=b[e:c+1]
f=c+1-e
if c>k:
    if c-1>=k:

        print(b[k])
        exit()
if 1 not in b:
    # print(b,f)
    ans=(k-e)%f
    print(b[ans])
else:

    ans=k%f
    print(b[ans])

### FIXED CODE ###


n,k=map(int,input().split())
a=list(map(int, input().split()))
b=[1]
ba={1}
c=0
m=0
# while flag==1:
for i in range(n):
    if a[m] not in ba:
        b.append(a[m])
        ba.add(a[m])
        c+=1
        m=a[m]-1
    else:
        e=a[m]
        break
# print(b,e,c+1)
e=b.index(e)
# print(b,e)
bc=b
b=b[e:c+1]
f=c+1-e
if c>k:
    if c-1>=k:

        print(bc[k])
        exit()
if 1 not in b:
    # print(b,f)
    ans=(k-e)%f
    print(b[ans])
else:

    ans=k%f
    print(b[ans])
n, l = map(int, input().split())
s = [input() for i in ramge(n)]
s1 = s.sort()
print("".join(s1))

### FIXED CODE ###

n, l = map(int, input().split())
s = [input() for i in range(n)]
s.sort()
print("".join(s))
r=sorted(map(int,input().split()))[-1]

print(r[0]-r[2])

### FIXED CODE ###

r=sorted(map(int,input().split()))[::-1]

print(r[0]-r[2])
n, k = map(int, input().split())
d = list(map(int, input().split()))

n_str = str(n)
# print(n_str)

l = list(({0, 1, 2, 3, 4, 5, 6, 7, 8, 9} - set(d)))

# print(l)
ans_list = []

for i in range(len(n_str)):
  if int(n_str[i]) in l:
    ans_list.append(n_str[i])
  elif int(n_str[i]) < l[-1]:
    for j in range(len(l)):
      if l[j] > int(n_str[i]):
        ans_list.append(l[j])
        break
    for k in range(i+1, len(n_str)):
      ans_list.append(l[0])
    break

# print(ans_list)

ans = ''
for i in range(len(ans_list)):
  ans += str(ans_list[i])

print(int(ans))

### FIXED CODE ###

n, k = map(int, input().split())
d = list(map(int, input().split()))

n_str = str(n)
# print(n_str)

l = list(({0, 1, 2, 3, 4, 5, 6, 7, 8, 9} - set(d)))

# print(l)

ans = n
found = False
while not found:
  found = True
  ans_str = str(ans)
  for i in range(len(ans_str)):
    if int(ans_str[i]) not in l:
      # print("NOT FOUND", ans_str[i])
      found = False
  ans +=1

ans -= 1

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

### FIXED CODE ###

N,M = input().split()
if N == M:
  print('Yes')
else:
  print('No')
5 5
.#.#.
#.#.#
.#.#.
#.#.#
.#.#.

### FIXED CODE ###

from collections import deque
H,W = map(int,input().split())
s = []
for i in range(H):
    s.append(list(input()))

que = deque()
alr = [[float('inf') for i in range(W)] for j in range(H)]
if s[0][0] == '.':
    alr[0][0] = 0
else:
    alr[0][0] = 1
que.append((0,0))
while que:
    h,w = que.popleft()
    if s[h][w] == '#':
        flag = True
    else:
        flag = False

    if h < H-1:
        if s[h+1][w] == '.':
            if alr[h+1][w] > alr[h][w]:
                alr[h+1][w] = alr[h][w]
                que.append((h+1,w))
        else:
            if flag:
                if alr[h+1][w] > alr[h][w]:
                    alr[h+1][w] = alr[h][w]
                    que.append((h+1,w))
            else:
                if alr[h+1][w] > alr[h][w]+1:
                    alr[h+1][w] =alr[h][w]+1
                    que.append((h+1,w))            
    if w < W-1:
        if s[h][w+1] == '.':
            if alr[h][w+1] > alr[h][w]:
                alr[h][w+1] =alr[h][w]
                que.append((h,w+1))
        else:
            if flag:
                if alr[h][w+1] > alr[h][w]:
                    alr[h][w+1] =alr[h][w]
                    que.append((h,w+1))
            else:
                if alr[h][w+1] > alr[h][w]+1:
                    que.append((h,w+1))
                    alr[h][w+1] = alr[h][w] + 1
print(alr[-1][-1])
from fractions import gcd

lcm = lambda x, y: x*y//gcd(x, y)

N, M = map(int, input().split())
s = input(
t = input()
l = lcm(N, M)
n, m = N//l, M//l

for i in range(l):
    if s[m*i] != t[n*i]:
        print(-1)
        exit()
print(l)

### FIXED CODE ###

from fractions import gcd

N, M = map(int, input().split())
s = input()
t = input()
g = gcd(N, M)
n, m = N//g, M//g

for i in range(g):
    if s[n*i] != t[m*i]:
        print(-1)
        exit()
print(N*M//g)
n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

count = 0

for x,y in zip(a,b):
  count += min(a[x],b[y])
  if count > k:
    break
    
print(k // count)


### FIXED CODE ###

a = int(input())

print(a + a ** 2 + a ** 3)
import sys
def input(): return sys.stdin.readline().rstrip()
import math
from functools import reduce
def gcd(*numbers):
    return reduce(math.gcd, numbers)
def main():
    n,k=map(int,input().split())
    A=list(map(int,input().split()))
    gcd_a=gcd(*A)
    if k%gcd_a==0 and max(A)>=k:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")


if __name__=='__main__':
    main()

### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().rstrip()
import fractions
from functools import reduce
def gcd(*numbers):
    return reduce(fractions.gcd, numbers)
def main():
    n,k=map(int,input().split())
    A=list(map(int,input().split()))
    gcd_a=gcd(*A)
    if k%gcd_a==0 and max(A)>=k:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")


if __name__=='__main__':
    main()
x= list(map(int,input().split()))

for i in range(%):
  if x[i] == 0:
    print(i+1)

### FIXED CODE ###

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

for i in range(5):
  if x[i] == 0:
    print(i+1)
from collections import deque
import sys
from copy import deepcopy
input = sys.stdin.readline


def bfs(table, i, j):
    dq = deque()
    if table[i][j] == "#":
        return -1
    h = len(table)
    w = len(table[0])
    ans = 0
    dq.append((i, j, 0))  # x,y,distance
    while dq:
        x, y, dis = dq.popleft()
        ans = max(ans, dis)
        if x > 0 and (x - 1, y) and table[x - 1][y] != "#":
            dq.append((x - 1, y, dis + 1))
            table[x - 1][y] = "#"
        if x < h - 1 and (x + 1, y) and table[x + 1][y] != "#":
            dq.append((x + 1, y, dis + 1))
            table[x + 1][y] = "#"
        if y > 0 and (x, y - 1) and table[x][y - 1] != "#":
            dq.append((x, y - 1, dis + 1))
            table[x][y - 1] = "#"
        if y < w - 1 and (x, y + 1) and table[x][y + 1] != "#":
            dq.append((x, y + 1, dis + 1))
            table[x][y + 1] = "#"
    return ans


def main():
    h, w = [int(i) for i in input().strip().split()]
    grid = [list(input().strip()) for _ in range(h)]
    ans = 0
    for i in range(h):
        for j in range(w):
            if grid[i][j] == ".":
                _grid = deepcopy(grid)
                max_path = bfs(_grid, i, j)
                ans = max(ans, max_path)

    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

c = input()
print(chr(ord(c)+1))
n,k=map(int,input().split())
a=list(map(int,input().split()))
s=[]
if n==1:
    print(a[0])
else:
    for i in range(n-k):
        if a[i]<=0 and 0<=a[i+k-1]:
            s.append(min(2*a[i+k-1]-a[i],a[i+k-1]-2*a[i]))
        elif a[i+k]<=2:
            s.append(-a[i])
        else:
            s.append(a[i+k-1])
    print(min(s))

### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
s=[]
if n==1:
    print(a[0])
else:
    for i in range(n-k+1):
        if a[i]<=0 and 0<=a[i+k-1]:
            s.append(min(2*a[i+k-1]-a[i],a[i+k-1]-2*a[i]))
        elif a[i+k-1]<=0:
            s.append(-a[i])
        else:
            s.append(a[i+k-1])
    print(min(s))
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
r = [b-a,c-b,d-c,e-d]
count = 0
for rr in r:
  if rr > k:
    count += 1
print(count

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a>k:
    print(":(")
else:
    print("Yay!")
import math
N = input()
S = 0
S = int(N[-3]) * 100
if S == 0:
    print(S)
else:
    print(1000 - S)

### FIXED CODE ###

import math
N = int(input())
S = 0
ans = 0
for i in range(1000, 10001, 1000):
    if i - N == 0:
        ans = 0
        break
    if i - N > 0:
        ans = i - N
        break
        # ans = min(ans, i - N)
        
print(ans)
N = int(input())

for i in range(0,N//4):
    if (N - 4*i)%7 == 0:
        print('Yes')
        sys.exit()
print('No')

### FIXED CODE ###

N = int(input())
for i in range(N//4+1):
    if (N - 4*i)%7 == 0:
        print('Yes')
        exit()
print('No')
from fractions import gcd
N=int(input())
A=[int(i) for i in input().split()]
ans=A[i]
for i in range(N-1):
    ans=gcd(ans,A[i+1])
print(ans)

### FIXED CODE ###

from fractions import gcd
N=int(input())
A=[int(i) for i in input().split()]
ans=A[0]
for i in range(N-1):
    ans=gcd(ans,A[i+1])
print(ans)
a = input()
b = input()
c = input()
A, B, C = len(a), len(b), len(c)
ab, bc, ac = [1] * 120000, [1] * 120000, [1] * 120000

for i in range(A):
    if a[i] == '?':
        continue
    for j in range(B):
        if b[i] == '?':
            continue
        if a[i] != b[j]:
            ab[i-j+6000]= 0
for i in range(B):
    if b[i] == '?':
        continue
    for j in range(C):
        if c[i] == '?':
            continue
        if b[i] != c[j]:
            bc[i-j+6000]= 0
for i in range(A):
    if a[i] == '?':
        continue
    for j in range(C):
        if c[i] == '?':
            continue
        if a[i] != c[j]:
            ac[i-j+6000]= 0
ans = 6000

for i in range(-2000, 2000):
    for j in range(-2000, 2000):
        if ab[i+6000] and bc[j-i+6000] and ac[j+6000]:
            L = min(0, min(i, j))
            R = max(A, max(B+i, C+j))
            ans = min(ans, R-L)
print(ans)
    

### FIXED CODE ###

a = input()
b = input()
c = input()
A, B, C = len(a), len(b), len(c)
ab, bc, ac = [1] * 16000, [1] * 16000, [1] * 16000

for i in range(A):
    if a[i] == '?':
        continue
    for j in range(B):
        if b[j] != '?' and a[i] != b[j]:
            ab[i-j+8000]= 0
for i in range(B):
    if b[i] == '?':
        continue
    for j in range(C):
        if c[j] != '?' and b[i] != c[j]:
            bc[i-j+8000]= 0
for i in range(A):
    if a[i] == '?':
        continue
    for j in range(C):
        if c[j] != '?' and a[i] != c[j]:
            ac[i-j+8000]= 0
ans = 6000

for i in range(-4000, 4000):
    for j in range(-4000, 4000):
        if ab[i+8000] and bc[j-i+8000] and ac[j+8000]:
            L = min(0, min(i, j))
            R = max(A, max(B+i, C+j))
            ans = min(ans, R-L)
print(ans)
import sys
n,k=map(int,input().split())
x=list(map(int,input().split()))
left=[]
right=[]
origin=0
for u in x:
    if u<0:
        left.append(abs(u))
    elif u==0:
        origin+=1
    else:
        right.append(u)
left.sort()
ans=float("inf")
k-=origin
if k==0:
    print(0)
    sys.exit()
r=len(right)
l=len(left)
for i in range(k):
    if i<r and k-i-2<l:
        y=right[i]+left[k-i-2]+min(right[i],left[k-i-2])
        ans=min(ans,y)
print(ans)

### FIXED CODE ###

import sys
n,k=map(int,input().split())
x=list(map(int,input().split()))
left=[]
right=[]
origin=0
for u in x:
    if u<0:
        left.append(abs(u))
    elif u==0:
        origin+=1
    else:
        right.append(u)
left.sort()
k-=origin
if k==0:
    print(0)
    sys.exit()
r=len(right)
l=len(left)
ans=float("inf")
if k<=r:
    ans=right[k-1]
if k<=l:
    ans=min(ans,left[k-1])
for i in range(k-1):
    if i<r and k-i-2<l:
        y=right[i]+left[k-i-2]+min(right[i],left[k-i-2])
        ans=min(ans,y)
print(ans)
n, k = map(int, input().split())
if n <= k:
  print(0)
  exit()
h = list(map(int, input().split())).sort()
print(sum(h[:-k]))

### FIXED CODE ###

n, k = map(int, input().split())
h = list(map(int, input().split()))
if n <= k:
  print(0)
elif k == 0:
  print(sum(h))
else:
  h = sorted(h)
  print(sum(h[:n-k]))
n = int(input())
m = int(input())
if (n<=9 and m<=9):
    print(n*m)
else:
    print("-1")

### FIXED CODE ###

import math
m = int(input())
k = 0
for i in range(1,10,1):
    for j in range(1,10,1):
        if i*j == m:
            k = 1
            break
if k == 1:
    print("Yes")
else:
    print("No")
hogehoge

### FIXED CODE ###

#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "YES"
no = "NO"




def main():
    k = ii()
    a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    print(a[k-1])



        
    


main()
from collections import deque
n, m = map(int, input().split())
a = deque(map(int, input().split()))
b = [list(map(int, input().split())) for i in range(m)]

mn = min(a)
for i in b:
    if i[1] < mn:
        continue
    a = a + deque([i[1]] * i[0])

a = list(a)
a.sort(reverse=True)
print(sum(a[:n]))

### FIXED CODE ###

from collections import Counter
n, m = map(int, input().split())
a = Counter(list(map(int, input().split())))

for i in range(m):
    b, c = map(int, input().split())
    a[c] += b

num = sorted(a.items(), key=lambda x: x[0], reverse=True)
ans = 0

for key, val in num:
    if n > val:
        ans += key * val
        n -= val
    else:
        ans += key * n
        break

print(ans)
n = (int)(input())

x = []
y = []
h = []

for _ in range(n):
    a, b, c = map(int, input().split())
    x.append(a)
    y.append(b)
    h.append(c)

for i in range(0, 100+1):
    for j in range(0, 100+1):
        tmp = [h[k] + abs(x[k]-i) + abs(y[k]-j) for k in range(n)]
        tmp.rempe(0)
        if tmp.count(tmp[0]) == len(tmp) and len(set(tmp)) == 1:
            print(i, j, (lambda x: x if x >= 0 else 0)(tmp[0]))
            exit()


### FIXED CODE ###

n = (int)(input())

x = []
y = []
h = []

for _ in range(n):
    a, b, c = map(int, input().split())
    x.append(a)
    y.append(b)
    h.append(c)

f = False
for i in range(0, 100+1):
    for j in range(0, 100+1):
        for k in range(n):
            if h[k] != 0:
                ch = h[k] + abs(i-x[k]) + abs(j-y[k])
                break
        if all(max(ch-abs(i-x[k]) - abs(j-y[k]), 0) == h[k] for k in range(n)):
            print(i, j, ch)
            exit()
K = int(input())

snuke = [1,2,3,4,5,6,7,8,9,19,29,39,49,59,69,79,89,99,199,299,399,499,599,699,799,899,999]

for n in range(3,16):
    for k in range(1,10):
        snuke.append(10**(n-1)*(10+k)-1)
    for k in range(2,10):
        snuke.append((k+1)*10**n-1)

for k in range(K):
    print(snuke[k])

### FIXED CODE ###

def snk_cal(i):
    snk = i
    i = str(i)
    q = 0
    for j in range(len(i)):
        q += int(i[j])
    snk /= q
    return snk

K = int(input())
if K <= 9:
    for i in range(K):
        print(i+1)
else:
    for i in range(9):
        print(i+1)
    K -= 9
    snk = 9
    while K > 0:
        res = snk+1
        d = len(str(res))
        l = []
        for i in range(d):
            n = int(str(res)[:-i-1]+'9'*(i+1))
            l.append(snk_cal(n))
        i = l.index(min(l))
        snk = int(str(res)[:-i-1]+'9'*(i+1))
        print(snk)
        K -= 1
N,K = map(int, input().split())
H = list(map(int,input().split()))
H.sort(reverse=True)
if K-1 ==len(H):
    S = 0
elif K == 0:
    S = sum(H)
else:
    for i in range(K):
        del H[i]
    S =sum(H)
print(S)

### FIXED CODE ###

N,K = map(int, input().split())
H = list(map(int,input().split()))
H.sort(reverse=True)
K = min(N,K)
S = sum(H[K:N])
print(S)
import itertools
import numpy as np

N, M, X = map(int, input().split())
items = np.array([list(map(int, input().split())) for _ in range(N)], dtype=np.int32)

out = 10**18
for c in itertools.product([False, True], repeat=M):
    tmp = np.sum(items[[np.where(c)]], axis=0)
    if np.any(tmp):
      if M == np.count_nonzero(tmp[1:] >= X):
        out = min(out, tmp[0])
if out == 10**18:
  print(-1)
else:
  print(out) 

### FIXED CODE ###

import itertools
import numpy as np

N, M, X = map(int, input().split())

items = np.array([list(map(int, input().split())) for _ in range(N)])

min_v = 10**18
for n in range(1, N+1):
  for c in itertools.combinations(range(N), n):
    tmp = np.sum(items[[c]], axis=0)
    c = tmp[0]
    a = tmp[1:]
    if M == np.count_nonzero(a >= X):
      min_v = min(min_v, c)
if min_v == 10**18:
  print(-1)
else:
  print(min_v)
print('#'*(w+2))
for i in range(h):    
    print('#'+input()+'#')
print('#'*(w+2))

### FIXED CODE ###

h,w=map(int,input().split())
print('#'*(w+2))
for i in range(h):    
    print('#'+input()+'#')
print('#'*(w+2))
import math

a, b = map(int, input().split())
n =  math.gcd(a, b)
def primes(x):
    if x < 2: return []

    primes = [i for i in range(x)]
    primes[1] = 0 # 1は素数ではない

    # エラトステネスのふるい
    for prime in primes:
        if prime > math.sqrt(x): break
        if prime == 0: continue
        for non_prime in range(2 * prime, x, prime): primes[non_prime] = 0

    return [prime for prime in primes if prime != 0]
l = primes(n)
count = 1
for p in l:
    if a % p == 0 and b % p == 0:
        count += 1
print(count)

### FIXED CODE ###

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

def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a
n = gcd(a, b)

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

ans = set(prime_factorize(n))
print(len(ans)+1)
pi = 3.141592653589793

r = int(input())
print("%.6f %.6f" % (pi * r ** 2, 2 * pi * r))


### FIXED CODE ###

pi = 3.141592653589793

r = float(input())
print("%.6f %.6f" % (pi * r ** 2, 2 * pi * r))
a=input()
for i in range(len(a)-1):
  if a[i]==a[i+1]:
    flag=True
    break
if flag:
  print('Bad')
else:
  print('Good')

### FIXED CODE ###

a=input()
flag=False
for i in range(len(a)-1):
  if a[i]==a[i+1]:
    flag=True
    break
if flag:
  print('Bad')
else:
  print('Good')
# Vol0005.


def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def get_gcd(x, y):
    if x < y: return get_gcd(y, x)
    # x >= yのときはx % yを計算してyとx % yの話にする。
    # ここでx % yのところが0ならばyが求める答えとなる。
    if y == 0: return x
    return get_gcd(y, x % y)

def main():
    data = []
    lines = sys.stdin.readlines()
    for line in lines:
        data.append(line.split())

    N = len(data)
    for i in range(N):
        a = int(data[i][0]); b = int(data[i][1])
        gcd = get_gcd(a, b)
        lcm = (a // gcd) * b
        print('%d %d' % (a, b))

if __name__ == "__main__":
    main()


### FIXED CODE ###

# Vol0005.
import sys


def intinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def get_gcd(x, y):
    if x < y: return get_gcd(y, x)
    # x >= yのときはx % yを計算してyとx % yの話にする。
    # ここでx % yのところが0ならばyが求める答えとなる。
    if y == 0: return x
    return get_gcd(y, x % y)

def main():
    data = []
    lines = sys.stdin.readlines()

    for line in lines:
        data.append(line.split())

    N = len(data)
    for i in range(N):
        a = int(data[i][0]); b = int(data[i][1])
        gcd = get_gcd(a, b)
        lcm = (a // gcd) * b
        print('%d %d' % (gcd, lcm))

if __name__ == "__main__":
    main()
n = input()
s = 0
a = input()
b = a.split(" ")
c = []
for i in range(n):
    c.append(int(b[i])
for u in c:
    s=s+u

print(min(c),max(c),s)


### FIXED CODE ###

n = input()
s = 0
a = input()
b = a.split(" ")
c = []
for i in range(int(n)):
    c.append(int(b[i]))

for u in c:
    s=s+u

print(min(c),max(c),s)
A,B,M = map(int,input().split())

reizou = input()
reizou_list = reizou.split()

renji = input()
renji_list = renji.split()
cupon_list = []

price = int(min(reizou_list)) + int(min(renji_list))

for i in range(int(M)):
    # coupon = input()
    # coupon_sub_list = coupon.split()
    # cupon_list.append(coupon_sub_list)
    
    a,b,c = map(int,input().split())
    price_coupon = int(reizou_list[a]) + int(renji_list[b]) - int(c)
    if price > price_coupon: price = price_coupon



### FIXED CODE ###

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

reizou = input()
reizou_list = reizou.split()

renji = input()
renji_list = renji.split()
cupon_list = []

price = int(min(reizou_list)) + int(min(renji_list))

for i in range(int(M)):
    # coupon = input()
    # coupon_sub_list = coupon.split()
    # cupon_list.append(coupon_sub_list)
    
    a,b,c = map(int,input().split())
    price_coupon = int(reizou_list[int(a) - 1]) + int(renji_list[int(b) - 1]) - int(c)
    if price > price_coupon: price = price_coupon

print(price)
s = input().split()
if s[3] == s[4] and s[5] == s[6]:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

s = input()
if s[2] == s[3] and s[4] == s[5]:
    print("Yes")
else:
    print("No")