Harryxun/stf_run huggingface dataset:
def main():
    k = int(input())
    
    if k == 7:
        print(1)
        sys.exit()
    
    r = 7%k
    g = {r}
    ans = 1
    while True:
        ans+=1
        r = (10*r+7)%k
        if r==0:
            print(ans)
            break
        if r in g:
            print(-1)
            break
        else:
            g.add(r)
main()

### FIXED CODE ###

import sys
def main():
    k = int(input())
    
    if k == 7 or k == 1:
        print(1)
        sys.exit()
    
    r = 7%k
    g = {r}
    ans = 1
    while True:
        ans+=1
        r = (10*r+7)%k
        if r==0:
            print(ans)
            break
        if r in g:
            print(-1)
            break
        else:
            g.add(r)
main()
import sys
import math


def main():
    a, b, x = map(int, sys.stdin.readline().strip().split())

    s = x / a
    if s > a * b / 2:
        # ans = math.atan(1 / (2 / a * (b - s / a)))
        ans = math.atan(a ** 2 / (2 * (a * b - s)))
    else:
        ans = math.atan(2 * s / (b ** 2))

    print(90 - math.degrees(ans))


if __name__ == '__main__':
    main()

### FIXED CODE ###

# D
import sys
import math


# def main():
#     a, b, x = map(int, sys.stdin.readline().strip().split())
#
#     s = x / a
#     if s > a * b / 2:
#         ans = math.atan(a ** 2 / (2 * (a * b - s)))
#     else:
#         ans = math.atan(2 * s / (b ** 2))
#
#     print(90 - math.degrees(ans))

def main():
    a, b, x = map(int, sys.stdin.readline().strip().split())

    s = x / a
    if s > a * b / 2:
        ans = math.degrees(math.atan(2 * b / a - 2 * s / (a ** 2)))
        print(ans)
    else:
        ans = 90 - math.degrees(math.atan(2 * s / (b ** 2)))
        print(ans)


if __name__ == '__main__':
    main()
from sys import stdin
import math

a, b = [int(x) for x in stdin.readline().rstrip().split()]

print(int(a * b / math.gcd(a, b)))

### FIXED CODE ###

from sys import stdin
import math
import fractions

a, b = [int(x) for x in stdin.readline().rstrip().split()]

print(int(a * b / fractions.gcd(a, b)))
n, k = map(int, input().split())
a=input().split()
sum=0
for i in a:
  sum+=int(a)>=k
print(sum)

### FIXED CODE ###

n, k = map(int, input().split())
a=input().split()
sum=0
for i in a:
  sum+=int(int(i)>=k)
print(sum)
N = int(input())
A = int(input())
if A => N%500:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N = int(input())
A = int(input())
if A >= N%500:
  print("Yes")
else:
  print("No")
from math import sqrt as s
from math import factorial as f

def func(x1, x2, y1, y2): return s((x2-x1) ** 2 + (y2-y1) ** 2)

N = int(input())
xy = list(list(map(int,input().split())) for _ in range(N))

total = 0

for i in range(N-1):
  for j in range(i+1, N):
    total += func(xy[l[i]][0], xy[l[j]][0], xy[l[i]][1], xy[l[j]][1])

print(total / f(N))

### FIXED CODE ###

from itertools import permutations as p
from math import factorial as f
from math import sqrt as s

def func(x1, x2, y1, y2): return s((x2-x1) ** 2 + (y2-y1) ** 2)

N = int(input())
xy = list(list(map(int,input().split())) for _ in range(N))

total = 0

for l in p(range(1, N+1)):
  for i in range(N-1):
    total += func(xy[l[i]-1][0], xy[l[i+1]-1][0], xy[l[i]-1][1], xy[l[i+1]-1][1])

print(total / f(N))
import sys
sys.setrecursionlimit(10**6)

def dfs1(s,c):
    visited[s]=1
    for i in v[s]:
        if visited[i]==0:
            d[c][i]=d[c][s]+1
            dfs1(i,c)
    return

def dfs2(c1,c2):
    visited[c2]=1
    dfs1(c1,c1)
    dfs1(c2,c2)
    return

n,k=map(int,raw_input().split())
d=[[0]*n for _ in xrange(n)]
v=[[] for _ in xrange(n)]
e=[]
for i in xrange(n-1):
    a,b=map(int,raw_input().split())
    a-=1
    b-=1
    v[a].append(b)
    v[b].append(a)
    e.append([a,b])
if k%2==0:
    min_del=1000000
    for i in xrange(n):
        cnt=0
        visited=[0]*n
        dfs1(i,i)
        for j in xrange(n):
            if d[i][j]>k/2:
                cnt+=1
        min_del=min(min_del,cnt)
    print(min_del)
else:
    min_del=1000000
    for i,j in e:
        cnt=0
        visited=[0]*n
        d=[[0]*n for _ in xrange(n)]
        dfs2(i,j)
        for l in xrange(n):
            if d[i][l]>(k-1)/2 or d[j][l]>(k-1)/2:
                cnt+=1
        min_del=min(min_del,cnt)
    print(min_del)

### FIXED CODE ###

n=input()
l=map(int,raw_input().split())
l.sort()
cnt=0
for i in xrange(n):
    cnt+=l[i*2]
print(cnt)
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 1 ;count = 0 ;pro = 1
def gcd(a, b):
    while(b != 0):
        a, b = b, a % b
    return a
    
def lcm(m,n):
    return (m*n)//gcd(m,n)

n = int(input())
def make_key0(a,b):
  if (a < 0 and b > 0) or (a > 0 and b < 0):hugou = 1
  else: hugou = -1
  a = abs(a)
  b = abs(b)
  G = gcd(a,b)
  return (hugou*(abs(a)//G),abs(b)//G)

def make_key1(a,b):
  if (a < 0 and b > 0) or (a > 0 and b < 0):hugou = -1
  else: hugou = 1
  a = abs(a)
  b = abs(b)
  G = gcd(a,b)
  return (hugou*(abs(b)//G),abs(a)//G)

C0 = collections.Counter()
C1 = collections.Counter()

for i in range(n):
  a,b = map(int,input().split())
  a0,b0 = make_key0(a,b)
  a1,b1 = make_key1(a,b)
  C0[(a0,b0)] += 1
  # C1[(a1,b1)] += 1
  # print(a0,b0,a1,b1)

S = set()
for key,val in C0.items():
  a0,b0 = key
  S.add((a0,b0))
  a1,b1 = make_key0(b0,a0)
  if (a1,b1) in S:continue
  # print((a0,b0))
  # print((a1,b1))
  # print((pow(2,val,mod) , pow(2,C0[(a1,b1)],mod)))
  # print((-1 if C0[(a1,b1)] else 0),C0[(a1,b1)])
  ans *= pow(2,val,mod) + pow(2,C0[(a1,b1)],mod) -1
  ans %= mod
print((ans-1)%mod)

# for key,val in C0.items():
#   print(key,val)

# for key,val in C1.items():
#   print(key,val)

### FIXED CODE ###

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 1 ;count = 0 ;pro = 1
def gcd(a, b):
    while(b != 0):
        a, b = b, a % b
    return a
    
def lcm(m,n):
    return (m*n)//gcd(m,n)

n = int(input())
def make_key0(a,b):
  if a == 0 and b != 0:
    return(0,1)
  elif a != 0 and b == 0:
    return(1,0)
  if (a < 0 and b > 0) or (a > 0 and b < 0):hugou = 1
  else: hugou = -1
  a = abs(a)
  b = abs(b)
  G = gcd(a,b)
  return (hugou*(abs(a)//G),abs(b)//G)

C0 = collections.Counter()

for i in range(n):
  a,b = map(int,input().split())
  if (a,b) == (0,0) :count += 1
  else:
    a0,b0 = make_key0(a,b)
    C0[(a0,b0)] += 1

S = set()
for key,val in C0.items():
  a0,b0 = key
  S.add((a0,b0))
  a1,b1 = make_key0(b0,a0)
  if (a1,b1) in S:continue
  ans *= pow(2,val,mod) + pow(2,C0[(a1,b1)],mod) -1
  ans %= mod
ans += count 
print((ans-1)%mod)
n, m = map(int, input().split())
if n%2 == 1:
  for i in range(m):
    print(m-i, m+1+i)
else:
  for i in range(m):
    if 4*(i+1) > n:
      print(m-1, m+2+i)
    else:
      pritn(m-1, m+1+i)

### FIXED CODE ###

n, m = map(int, input().split())
if n%2 == 1:
  for i in range(m):
    print(m-i, m+1+i)
else:
  for i in range(m):
    if 4*(i+1) > n:
      print(m-i, m+2+i)
    else:
      print(m-i, m+1+i)
N = int(input())
S = 0
for i in range(1, 10):
    S += N % 10**i

print('Yes' if N % S == 0 else 'No')


### FIXED CODE ###

N = int(input())
S = 0

for i in range(10):
    S += (N % 10**(i+1)) // 10**i 
print('Yes' if N % S == 0 else 'No')
n = list(input().lower())
charac = []
for j in range(97,97+26):
    m= 0
    for i in range(0,len(n)):
        if ord(n[i]) == j:
            m += 1
        charac.append("{} : {}".format(chr(j),m))

for i in range(0,26):
    print charac[i]

### FIXED CODE ###

s =""
while True:
    try:
        s += input().lower()
    except:
        break
    
s = list(map(ord,list(s)))
for i in range(ord("a"),ord("z")+1):
    print(chr(i) + " : " + str(s.count(i)))
# coding:utf-8
import sys
import datetime

# H1 = int(sys.stdin.readline())
# M1 = int(sys.stdin.readline())
# H2 = int(sys.stdin.readline())
# M2 = int(sys.stdin.readline())
# K = int(sys.stdin.readline())

H1 = 999
M1 = 999
H2 = 999
M2 = 999
K = 999


while not (H1 < 23 or M1 < 59 or H2 < 23 or M2 < 59):
    H1 = int(sys.stdin.readline())
    M1 = int(sys.stdin.readline())
    H2 = int(sys.stdin.readline())
    M2 = int(sys.stdin.readline())
    K = int(sys.stdin.readline())
else:
    if M2 >= M1:
        a = (H2 - H1) * 60 + M2 - M1
        print(a - K)
    if M2 < M1:
        b = (H2 - H1) * 60 + M1 - M2
        print(b - K)

### FIXED CODE ###

import sys
readline = sys.stdin.buffer.readline

h1, m1, h2, m2, k = map(int, readline().split())
print(60 * (h2 - h1) + m2 - m1 - k)
(n,m,o,p) = map(int, raw_input().split())
print ((n-o)**2 + (m-p)**2)**0.5

### FIXED CODE ###

(n,m,o,p) = map(float, raw_input().split())
print ((n-o)**2 + (m-p)**2)**0.5
a,b,c = map(int,input().split()
print(b*int(c/a))

### FIXED CODE ###

a,b,c = map(int,input().split())
print(b*int(c/a))
a=int(input())
p=3.141592;
print("{0:.9f} {1:.9f}".format(a*a*p,a*2*p))


### FIXED CODE ###

import math
a=float(input())
print("{0:.9f} {1:.9f}".format(a*a*math.pi,a*2*math.pi))
n,k=map(int,input().split())
s=list(input())
l,tmpl,cnt0,tmp,flag=[],0,0,s[0],0
if tmp=="0":cnt0+=1;flag=1
for i in s:
    if i==tmp:tmpl+=1
    else:
        if i=="0":cnt0+=1
        tmp=i
        l.append(tmpl)
        tmpl=1
l.append(tmpl)
if cnt0<=k:print(n);exit()
ans=max(sum(l[:2*k]),sum(l[::-1][:2*k]))
suml,tmp=[0],0
if flag==1:l=l[1:]
for i in l:
    tmp+=i
    suml.append(tmp)
for i in range((len(suml)-2*k-1)//2+1):
    tmp=suml[2*k+2*i+1]-suml[2*i]
    print(tmp)
    if tmp>ans:ans=tmp
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
s=list(input())
l,tmpl,cnt0,tmp,flag1,flag2=[],0,0,s[0],0,0
if tmp=="0":cnt0+=1;flag1=1
for i in s:
    if i==tmp:tmpl+=1
    else:
        if i=="0":cnt0+=1
        tmp=i
        l.append(tmpl)
        tmpl=1
if tmp=="0":flag2=1
l.append(tmpl)
if cnt0<=k:print(n);exit()
ans=max(sum(l[:2*k]),sum(l[::-1][:2*k]))
suml,tmp=[0],0
if flag1==1:l=l[1:]
if flag2==1:l=l[:len(l)-1]
for i in l:
    tmp+=i
    suml.append(tmp)
for i in range((len(suml)-2*k-1)//2+1):
    tmp=suml[2*k+2*i+1]-suml[2*i]
    if tmp>ans:ans=tmp
print(ans)
_input = [i for i in open(0).read().split('\n') if i]
n, k = [int(i) for i in _input[0].split()]
edge = [[int(p) for p in i.split()] for i in _input[1:n]]

if not edge:
    print(k)
else:
    import collections
    import math

    all_edge_map = collections.defaultdict(list)
    for e in edge:
        all_edge_map[e[0]].append(e[1])
        all_edge_map[e[1]].append(e[0])

    root = edge[0]
    visit  = list(all_edge_map[root[0]])
    tree_edge_map = collections.defaultdict(list)
    colored = []
    total = (math.factorial(k) // math.factorial(k - len(all_edge_map[root[0]]) - 1))
    total %= 1000000007


### FIXED CODE ###

import sys
sys.setrecursionlimit(4100000)

_input = [i for i in open(0).read().split('\n') if i]
n, k = [int(i) for i in _input[0].split()]
edge = tuple([tuple([int(p) for p in i.split()]) for i in _input[1:n]])

factorial = [0] * (k + 1)
inverse = [0] * (k + 1)
MOD = 1000000007

# Ref: http://keita-matsushita.hatenablog.com/entry/2016/12/05/175024
def mod_pow1(n, k, mod):
    a = 1
    while k:
        if (k & 1) == 1:
            a = (a * n) % mod
        n = (n * n) % mod
        k >>= 1
    return a

# Ref: https://www.smartbowwow.com/2018/10/mod1097.html
def mod_pow2(n, k, mod):
    if k == 0:
        return 1
    if k % 2 == 0:
        a = mod_pow2(n, k // 2, mod)
        return (a * a) % mod
    else:
        return (n * mod_pow2(n, k - 1, mod)) % mod

#mod_pow = mod_pow1
# It's better to use built-in function for speed.
mod_pow = pow

def mod_factorial_inverse(k, mod):
    factorial[0] = 1
    inverse[0] = 1

    # Ref: http://keita-matsushita.hatenablog.com/entry/2016/12/05/184011
    for i in range(1, k + 1):
        factorial[i] = ((i * factorial[i - 1]) % mod) # factrial[i]
        inverse[i] = mod_pow(factorial[i], mod - 2, mod) # inverse[i]
 
total = 1

if not edge:
    print(k)
else:
    all_edge = tuple([[] for _ in range(n + 1)])
    for e in edge:
        all_edge[e[0]].append(e[1])
        all_edge[e[1]].append(e[0])
    all_edge = [set(v) for v in all_edge]

    if [v for v in all_edge if len(v) >= k]:
        print(0)
    else:
        mod_factorial_inverse(k, MOD)

        root = edge[0]
        total = (factorial[k] * inverse[k - len(all_edge[root[0]]) - 1]) % MOD

        def dfs(current, from_):
            global total
            child = all_edge[current]
            if len(child) - 1 > 0:
                total = (total * factorial[k - 2] * inverse[k - 2 - (len(child) - 1)]) % MOD
            for c in child:
                if c != from_:
                    dfs(c, current)
        for c in all_edge[root[0]]:
            dfs(c, root[0])
        print(total)
x,y,z = input().split()
a,b,c = input().split()
lst1 = [x,y,z]
lst2 = [a,b,c]
num = 0
for i in range(3):
    if lst1[i] == lst2[i]:
        num = num + 1
    else:
        num = num
print(num)

### FIXED CODE ###

x = input()
y = input()
num = 0
for i in range(3):
    if x[i] == y[i]:
        num = num + 1
    else:
        num = num
print(num)
n = int(input())
d = []
e = [0,0,0,0,0]
f = [74,24,14,4,2]
for i in prime_list:
  a = n
  b = 0
  c = 1
  while a // (i**c) > 0:
    b += a // (i**c)
    c += 1
  else:
    d.append(b)
count = 0
len_d = len(d)-1
for k in f:
  for i,j in enumerate(d):
    if j < k:
      e[count] = i
      count += 1
      break
    elif i == len_d:
      e[count] = i+1
      count += 1
      break


print(e[0]+e[1]*(e[4]-1)+e[2]*(e[3]-1)+(e[3]*(e[3]-1)//2)*(e[4]-2))


### FIXED CODE ###

n = int(input())
prime_list = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47]
d = []
e = [0,0,0,0,0]
f = [74,24,14,4,2]
for i in prime_list:
  a = n
  b = 0
  c = 1
  while a // (i**c) > 0:
    b += a // (i**c)
    c += 1
  else:
    d.append(b)
count = 0
len_d = len(d)-1
for k in f:
  for i,j in enumerate(d):
    if j < k:
      e[count] = i
      count += 1
      break
    elif i == len_d:
      e[count] = i+1
      count += 1
      break



print(e[0]+e[1]*(e[4]-1)+e[2]*(e[3]-1)+(e[3]*(e[3]-1)//2)*(e[4]-2))
n, K = map(int, input().split())

mo = 1000000007
ret = 1
E = [[] for _ in range(n)]
def dfs(cur, pre, cand):
    global ret
    ret = ret * cand
    cand = K - 1 - (pre != -1)
    for e in E[cur]:
        if e != pre:
            dfs(e, cur, cand)
            cand -= 1

for _ in range(n-1):
    a, b = map(int, input().split())
    E[a-1].append(b-1)
    E[b-1].append(a-1)

dfs(0, -1, K)
print(ret % mo)


### FIXED CODE ###

import sys

sys.setrecursionlimit(10**9)

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

mo = 1000000007
ret = 1
E = [[] for _ in range(n)]

def dfs(cur, pre, cand):
    global ret
    ret = (ret % mo * (cand % mo)) % mo
    k = 0
    if pre != -1:
        k = 1
    cand = K - 1 - k
    for e in E[cur]:
        if e != pre:
            dfs(e, cur, cand)
            cand -= 1

for _ in range(n-1):
    a, b = map(int, input().split())
    E[a-1].append(b-1)
    E[b-1].append(a-1)

dfs(0, -1, K)
print(ret % mo)
S=[]
T=[]
n=int(input())
s=input().split()
for i in range(n):
	S.append(s[i])
q=int(input())
t=input().split()
for j in range(q):
	T.append(t[j])
cnt=0
for i in range(n):
	for j in range(q):
		if S[i]==T[j]:
			cnt+=1
print(cnt)


### FIXED CODE ###

S=[]
T=[]
n=int(input())
s=input().split()
for i in range(n):
	S.append(s[i])
q=int(input())
t=input().split()
for j in range(q):
	T.append(t[j])
cnt=0
for i in range(q):
	for j in range(n):
		if T[i]==S[j]:
			cnt+=1
			break
print(cnt)
n, m, x, y = map(int, input().split())
x_city = list(map(int, input().split()))
y_city = list(map(int, input().split()))
x_city.sort()
y_city.sort()
if y_city[0] - x_city[-1] > 0 and x < y_city[0] and x[-1] < y:
    print('No War')
else:
    print('War')

### FIXED CODE ###

n, m, x, y = map(int, input().split())
x_city = list(map(int, input().split()))
y_city = list(map(int, input().split()))
x_city.sort()
y_city.sort()
if y_city[0] - x_city[-1] > 0 and x < y_city[0] and x_city[-1] < y:
    print('No War')
else:
    print('War')
r1, c1, r2, c2 = list(map(int, input().split()))

mod = 1000000007

# return an integer k s.t. (a * k) % p = 1 and 0 <= k < p.
def inversion(a):
    b = mod
    u, v = 1, 0
    while b >= 1:
        t = a // b
        a -= t * b
        a, b = b, a
        u -= t * v
        u, v = v, u
    u %= mod
    if u < 0:
        u += mod
    return u

fact = [0 for i in range(200003)]
for i in range(200003):
    if i <= 1:
        fact[i] = 1
    else:
        fact[i] = (fact[i-1] * i) % mod

# return nCr % p.
def combination(n, r):
    return (((fact[n] * inversion(fact[r])) % mod) * inversion(fact[n-r])) % mod

answer = (
combination(r2 + c2 + 2, r2 + 1) -
combination(r2 + c1 + 1, r2 + 1) -
combination(r1 + c2 + 1, c2 + 1) +
combination(r1 + c1    , c1    ) )

answer %= mod

if answer < 0:
    answer += mod

print(answer)


### FIXED CODE ###

r1, c1, r2, c2 = list(map(int, input().split()))

mod = 1000000007

# return an integer k s.t. (a * k) % p = 1 and 0 <= k < p.
def inversion(a):
    b = mod
    u, v = 1, 0
    while b >= 1:
        t = a // b
        a -= t * b
        a, b = b, a
        u -= t * v
        u, v = v, u
    u %= mod
    if u < 0:
        u += mod
    return u

fact = [0 for i in range(2000003)]
for i in range(2000003):
    if i <= 1:
        fact[i] = 1
    else:
        fact[i] = (fact[i-1] * i) % mod

# return nCr % p.
def combination(n, r):
    return (((fact[n] * inversion(fact[r])) % mod) * inversion(fact[n-r])) % mod

answer = (
combination(r2 + c2 + 2, r2 + 1) -
combination(r2 + c1 + 1, r2 + 1) -
combination(r1 + c2 + 1, c2 + 1) +
combination(r1 + c1    , c1    ) )

answer %= mod

if answer < 0:
    answer += mod

print(answer)
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7

if N - A.count(0) < K:
    print(0)
    exit(0)

plus = []
minus = []
for a in A:
    if a >= 0:
        plus.append(a)
    else:
        minus.append(a)


if K % 2 == 1 and len(plus) == 0:
    minus.sort(reverse=True)
    ans = 1
    for i in range(K):
        ans *= minus[i]
        ans %= MOD
    print(ans)
    exit(0)

plus.sort(reverse=True)
minus.sort()

i = 0
j = 0

ans = 1
if K % 2 == 1:
    ans = plus[0]
    K -= 1
    plus = plus[1:]

for _ in range(K//2):
    if i+1 >= len(plus):
        ans *= (minus[j] * minus[j+1])
        ans %= MOD
        j += 2
        continue
    elif j+1 >= len(minus):
        ans *= (plus[i] * plus[i+1])
        ans %= MOD
        i += 2
        continue

    a = plus[i] * plus[i+1]
    b = minus[j] * minus[j+1]
    if a > b:
        ans *= a
        i += 2
    else:
        ans *= b
        j += 2
    ans %= MOD

print(ans)


### FIXED CODE ###

N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7

ans = 1
if N == K:
    for a in A:
        ans *= a
        ans %= MOD
    print(ans)
    exit(0)

if N - A.count(0) < K:
    print(0)
    exit(0)

plus = []
minus = []
for a in A:
    if a > 0:
        plus.append(a)
    else:
        minus.append(a)

if K % 2 == 1 and len(plus) == 0:
    minus.sort(reverse=True)
    for i in range(K):
        ans *= minus[i]
        ans %= MOD
    print(ans)
    exit(0)

plus.sort(reverse=True)
minus.sort()

if len(minus) == 0:
    for k in range(K):
        ans *= plus[k]
        ans %= MOD
    print(ans)
    exit(0)

i = 0
j = 0

if K % 2 == 1:
    ans = plus[0]
    K -= 1
    plus = plus[1:]

for _ in range(K//2):
    if i+1 >= len(plus):
        ans *= (minus[j] * minus[j+1])
        ans %= MOD
        j += 2
        continue
    elif j+1 >= len(minus):
        ans *= (plus[i] * plus[i+1])
        ans %= MOD
        i += 2
        continue

    a = plus[i] * plus[i+1]
    b = minus[j] * minus[j+1]
    if a > b:
        ans *= a
        i += 2
    else:
        ans *= b
        j += 2
    ans %= MOD

print(ans)
# sys.stdin.readline()
import sys
import math
input = sys.stdin.readline

x, y = map(int, input().split())
hex_x = int(x, 16)
hex_y = int(y, 16)
if hex_x > hex_y:
    ans = '>'
elif hex_x < hex_y:
    ans = '<'
else:
    ans = '='
print(ans)

### FIXED CODE ###

# sys.stdin.readline()
import sys
import math
input = sys.stdin.readline

x, y = input().split()
hex_x = int(x, 16)
hex_y = int(y, 16)
if hex_x > hex_y:
    ans = '>'
elif hex_x < hex_y:
    ans = '<'
else:
    ans = '='
print(ans)
strstart = input()
wzc = 0
wzf = 0
for i in strstart:
    i2 += 1
    if i == 'C':
        wzc = i2
    if i == 'F':
        wzf = i2
if wzc < wzf:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

s=input();pd=0
for i in range(0,len(s)):
    if s[i]=='C':
        pd=1
    if s[i]=='F'and pd==1:
        print('Yes')
        pd=2
        break
if pd!=2:
    print('No')
x = []
for i in range(1000):
  x.append([0] * 10000000000000)

### FIXED CODE ###

s = input()
if s == 'AAA' or s == 'BBB':
  print('No')
else:
  print('Yes')
yandy
N, M = map(int, input().split())
c = [0] * M
for i in range(N):
    a = [int(i) for i in input().split()]
    for j in a[1:]:
        c[j-1] += 1

print(c.count(N))

n, m = map(int, input().split())
a = [list(map(int, input().split())) for i in range(n)]
for i in a:
    i.pop(0)
for i in range(n-1):
    a[i+1] = set(a[i]) & set(a[i+1])
print(len(a[n-1]))

### FIXED CODE ###

N, M = map(int, input().split())
c = [0] * M
for i in range(N):
    a = [int(i) for i in input().split()]

    for j in a[1:]:
        c[j-1] += 1
 
print(c.count(N))
# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_4_B
# Binary Search
# Result:
import sys

NO_ANSWER = -1

def binary_sarch(target, ary, start, end):
    if start == end:
        if target == ary[start]:
            return start
        else:
            return NO_ANSWER

    mid = (start + end) / 2
    if target < ary[mid]:
        return binary_sarch(target, ary, start, mid - 1)
    elif target > ary[mid]:
        return binary_sarch(target, ary, mid + 1, end)
    else: # target == ary[mid]
        return mid


### main
ary_s_len = int(sys.stdin.readline().rstrip())
ary_s = [int(x) for x in sys.stdin.readline().rstrip().split(' ')]
ary_t_len = int(sys.stdin.readline().rstrip())
ary_t = [int(x) for x in sys.stdin.readline().rstrip().split(' ')]
assert len(ary_s) == ary_s_len
assert len(ary_t) == ary_t_len

count = 0
for e in ary_t:
    idx = binary_sarch(e, ary_s, 0, ary_s_len - 1)
    if idx >= 0:
        count += 1
print count

### FIXED CODE ###

# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_4_B
# Binary Search
# Result:
import sys

NO_ANSWER = -1

def binary_sarch(target, ary, start, end):
    if start == end:
        if target == ary[start]:
            return start
        else:
            return NO_ANSWER

    mid = (start + end) / 2
    if target < ary[mid]:
        return binary_sarch(target, ary, start, mid)
    elif target > ary[mid]:
        return binary_sarch(target, ary, mid + 1, end)
    else: # target == ary[mid]
        return mid


### main
ary_s_len = int(sys.stdin.readline().rstrip())
ary_s = [int(x) for x in sys.stdin.readline().rstrip().split(' ')]
ary_t_len = int(sys.stdin.readline().rstrip())
ary_t = [int(x) for x in sys.stdin.readline().rstrip().split(' ')]
assert len(ary_s) == ary_s_len
assert len(ary_t) == ary_t_len

count = 0
for e in ary_t:
    idx = binary_sarch(e, ary_s, 0, ary_s_len - 1)
    if idx >= 0:
        count += 1
print count
x,y,z=input().split()
x=int(x)
y=int(y)
z=int(z)
i=0
while i<10:
  d=x*z*-y
  print(d)
  i+=1

### FIXED CODE ###

a,b=input().split()
a=int(a)
b=int(b)
C=int(b/2)
if a>=13:
  print(b)
elif a<13 and a>=6:
  print(C)
else:
  print(0)